Skip to content

Commit

Permalink
#134 WIP GitHub Actions, Run on latest .NET Core SDK/macOS, new cspro…
Browse files Browse the repository at this point in the history
…j, dotnet project structure

Still more work todo but need to commit so I can run on windows.
  • Loading branch information
niemyjski committed May 5, 2020
1 parent 6227ef1 commit 0213d18
Show file tree
Hide file tree
Showing 150 changed files with 254 additions and 804 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build
on: [push, pull_request]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.201
- name: Build Reason
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"
- name: Build Version
id: version
uses: thefringeninja/[email protected]
with:
tag-prefix: v
- name: Build
run: dotnet build --configuration Release TinyIoC.sln
- name: Run Tests
run: dotnet test --configuration Release --results-directory artifacts --no-build --logger:trx TinyIoC.sln
- name: Package
if: github.event_name != 'pull_request'
run: dotnet pack --configuration Release --no-build TinyIoC.sln
- name: Publish CI Packages
shell: bash
run: |
for package in $(find -name "*.nupkg" | grep "minver" -v); do
echo "${0##*/}": Pushing $package...
# GPR
# workaround for GPR push issue
curl -sX PUT -u "TinyIoC:${{ secrets.GITHUB_TOKEN }}" -F package=@$package https://nuget.pkg.github.com/TinyIoC/
done
- name: Publish Release Packages
shell: bash
if: startsWith(github.ref, 'refs/tags/v')
run: |
for package in $(find -name "*.nupkg" | grep "minver" -v); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }}
done
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: artifacts
path: artifacts
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ build/
*.testlog
testlog.manifest
src/.vs/TinyIoC/DesignTimeBuild/.dtbcache.v2

.idea/.idea.TinyIoC/.idea/

.DS_Store
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
[![Build status](https://github.com/grumpydev/TinyIoC/workflows/Build/badge.svg)](https://github.com/grumpydev/TinyIoC/actions)
[![NuGet Version](http://img.shields.io/nuget/v/TinyIoC.svg?style=flat)](https://www.nuget.org/packages/TinyIoC/)

## Welcome to TinyIoC

### Overview ###
### Overview

Welcome to TinyIoC - an easy to use, hassle free, Inversion of Control Container. TinyIoC has been designed to fulfil a single key requirement - to lower the "level of entry" for using an IoC container; both for small projects, and developers who are new to IoC who might be "scared" of the "big boys"!

To that end, TinyIoC attempts to stick to the following core principals:

* **Simplfied Inclusion** - No assembly to reference, no binary to worry about, just a single cs file you can include in your project and you're good to go. It even works with both Mono and MonoTouch for iPhone development!
* **Simplified Inclusion** - No assembly to reference, no binary to worry about, just a single cs file you can include in your project and you're good to go. It even works with both Mono and MonoTouch for iPhone development!
* **Simplified Setup** - With auto-resolving of concrete types and an "auto registration" option for interfaces setup is a piece of cake. It can be reduced to 0 lines for concrete types, or 1 line if you have any interface dependencies!
* **Simple, "Fluent" API** - Just because it's "Tiny", doesn't mean it has no features. A simple "fluent" API gives you access to the more advanced features, like specifying singleton/multi-instance, strong or weak references or forcing a particular constructor.

In addition to this, TinyIoC's "simplified inclusion" makes it useful for providing DI for internal library classes, or providing your library the ability to use DI without the consuming developer having to specify a container (although it's useful to provide the option to do so).

**Note** For ASP.Net per-request lifetime support you will need to also include TinyIoCAspNetExtensions.cs, and the TinyIoC namespace. This provides an extension method for supporting per-request registrations. It's an extra file, but it's preferable to taking a dependency on Asp.Net in the main file, which then requires users to setup #DEFINEs for non-asp.net platforms.

### Key Features ###
### Key Features

* Simple inclusion - just add the CS file (or VB file coming soon!) and off you go.
* Wide platform support - actively tested on Windows, Mono, MonoTouch, PocketPC and Windows Phone 7. Also works just fine on MonoDroid.
Expand Down
File renamed without changes.
15 changes: 0 additions & 15 deletions TinyIoC.nuspec

This file was deleted.

33 changes: 19 additions & 14 deletions src/TinyIoC.sln → TinyIoC.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3549B35C-E6A0-4007-8BBD-C82396AA28A1}"
ProjectSection(SolutionItems) = preProject
LocalTestRun.testrunconfig = LocalTestRun.testrunconfig
tinyioc.vsmdi = tinyioc.vsmdi
EndProjectSection
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TinyIoC", "src\TinyIoC\TinyIoC.csproj", "{72FF4023-DEDF-40D2-8E54-1BB3E9C38C5C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TinyIoC.Tests", "TinyIoC.Tests\TinyIoC.Tests.csproj", "{C0F65D37-0DF3-43F6-9338-8FC57453876A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TinyIoC.Tests", "tests\TinyIoC.Tests\TinyIoC.Tests.csproj", "{C0F65D37-0DF3-43F6-9338-8FC57453876A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TinyIoC", "TinyIoC\TinyIoC.csproj", "{72FF4023-DEDF-40D2-8E54-1BB3E9C38C5C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TinyIoC.Tests.ExternalTypes", "tests\TinyIoC.Tests.ExternalTypes\TinyIoC.Tests.ExternalTypes.csproj", "{F6422C73-C40A-489A-A822-387E3098B2F1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TinyIoC.Tests.ExternalTypes", "TinyIoC.Tests.ExternalTypes\TinyIoC.Tests.ExternalTypes.csproj", "{F6422C73-C40A-489A-A822-387E3098B2F1}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{234A5083-1F24-45B1-9A50-5318A3EC9DFD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyIoC.AspNetExtensions", "src\TinyIoC.AspNetExtensions\TinyIoC.AspNetExtensions.csproj", "{10A02824-B74A-4A2B-905A-486DF703ADA7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyMessenger", "src\TinyMessenger\TinyMessenger.csproj", "{C89AD914-7A99-4BFF-B645-AB787FEFC89A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -33,18 +33,23 @@ Global
{F6422C73-C40A-489A-A822-387E3098B2F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6422C73-C40A-489A-A822-387E3098B2F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F6422C73-C40A-489A-A822-387E3098B2F1}.Release|Any CPU.Build.0 = Release|Any CPU
{10A02824-B74A-4A2B-905A-486DF703ADA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10A02824-B74A-4A2B-905A-486DF703ADA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10A02824-B74A-4A2B-905A-486DF703ADA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10A02824-B74A-4A2B-905A-486DF703ADA7}.Release|Any CPU.Build.0 = Release|Any CPU
{C89AD914-7A99-4BFF-B645-AB787FEFC89A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C89AD914-7A99-4BFF-B645-AB787FEFC89A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C89AD914-7A99-4BFF-B645-AB787FEFC89A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C89AD914-7A99-4BFF-B645-AB787FEFC89A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A25E106A-01ED-4DE8-8278-A216350EE569}
EndGlobalSection
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = TinyIoC.vsmdi
GlobalSection(NestedProjects) = preSolution
{C0F65D37-0DF3-43F6-9338-8FC57453876A} = {234A5083-1F24-45B1-9A50-5318A3EC9DFD}
{F6422C73-C40A-489A-A822-387E3098B2F1} = {234A5083-1F24-45B1-9A50-5318A3EC9DFD}
EndGlobalSection
EndGlobal
17 changes: 0 additions & 17 deletions TinyIoCAspNetExtensions.nuspec

This file was deleted.

17 changes: 0 additions & 17 deletions TinyIoCWinRT.nuspec

This file was deleted.

14 changes: 0 additions & 14 deletions TinyMessenger.nuspec

This file was deleted.

Binary file removed art/TinyIoC.png
Binary file not shown.
Binary file removed art/TinyIoC.psd
Binary file not shown.
22 changes: 0 additions & 22 deletions build.ps1

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="..\build\common.props" />
</Project>
5 changes: 0 additions & 5 deletions src/LocalTestRun.testrunconfig

This file was deleted.

35 changes: 35 additions & 0 deletions src/TinyIoC.AspNetExtensions/TinyIoC.AspNetExtensions.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT' ">
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Label="Package">
<PackageTags>IoC,ASPNET</PackageTags>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<Compile Remove="TinyIoCAspNetExtensions.cs" />
<None Include="TinyIoCAspNetExtensions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TinyIoC\TinyIoC.csproj" />
</ItemGroup>
</Project>
File renamed without changes.
29 changes: 0 additions & 29 deletions src/TinyIoC.MetroStyle/Properties/AssemblyInfo.cs

This file was deleted.

Loading

0 comments on commit 0213d18

Please sign in to comment.