Skip to content

Commit

Permalink
Merge pull request #420 from seesharper/feature/align-to-ms-di
Browse files Browse the repository at this point in the history
Better support for Microsoft.Extensions.DependencyInjection
  • Loading branch information
seesharper authored Jun 23, 2018
2 parents a01be40 + baac14f commit 1b7fe2e
Show file tree
Hide file tree
Showing 36 changed files with 701 additions and 1,263 deletions.
33 changes: 20 additions & 13 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
version: 1.0.{build}
image: Visual Studio 2017

install:
- cmd: choco install csx --source https://www.nuget.org/api/v2 --pre
- ps: iwr https://raw.githubusercontent.com/dotnet/cli/release/2.1.3xx/scripts/obtain/dotnet-install.ps1 -outfile dotnet-install.ps1
- ps: .\dotnet-install.ps1 -Version 2.1.300 -InstallDir $env:ProgramFiles/dotnet
- cmd: choco install dotnet.script

build_script:
- cmd: >-
cd build
csx build.csx pack
test: off
refreshenv
dotnet script build.csx
artifacts:
- path: /**/LightInject*.nupkg
- path: build\Artifacts\NuGet\*.nupkg
name: NuGet Packages
deploy:
provider: NuGet
api_key:
secure: ynFcRQX0oim3DdR5Y8s4BtynS/NYRG059GvWGckqhpZGNZVvhvvn5UUWgsyPKLKm
skip_symbols: false
artifact: /.*\.nupkg/
on:
appveyor_repo_tag: true

test: off
environment:
IS_SECURE_BUILDENVIRONMENT:
secure: xYC5jpSucUdHr8YwfxWefw==
GITHUB_REPO_TOKEN:
secure: FSPXTPuTgFMaZA7DubJoX217SkWhFLN2BGqCCi4gBux967eFtwkhbrafm7ay8cP2
NUGET_APIKEY:
secure: ynFcRQX0oim3DdR5Y8s4BtynS/NYRG059GvWGckqhpZGNZVvhvvn5UUWgsyPKLKm
19 changes: 10 additions & 9 deletions build/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"name": ".NET Script Debug",
"type": "coreclr",
"request": "launch",
"program": "C:/ProgramData/Chocolatey/lib/csx/csx/csx.exe",
"args": ["${file}","pack"],
"request": "launch",
"program": "dotnet",
"args": [
"exec",
"C:/Users/bri/.dotnet/tools/.store/dotnet-script/0.25.0/dotnet-script/0.25.0/tools/netcoreapp2.1/any/dotnet-script.dll",
"${file}"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"console": "internalConsole",
"requireExactSource": false
"stopAtEntry": true
}
]
}

}
20 changes: 0 additions & 20 deletions build/.vscode/tasks.json

This file was deleted.

34 changes: 34 additions & 0 deletions build/Artifacts/GitHub/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Change Log
## [Unreleased (17.05.2018)](/~https://github.com/seesharper/LightInject/tree/HEAD)

### [Full Changelog](/~https://github.com/seesharper/LightInject/compare/v5.1.3...a01be40607761d9b446dc4acad37d7f717742975)

#### Merged Pull Requests
* Tests/decorators (17.05.2018) [\#418](/~https://github.com/seesharper/LightInject/pull/418) ([seesharper](/~https://github.com/seesharper))

#### Closed Issues

* Parallel scopes (16.05.2018) [\#112](/~https://github.com/seesharper/LightInject/issues/112) ([seesharper](/~https://github.com/seesharper))
* Change Log Missing? (17.05.2018) [\#272](/~https://github.com/seesharper/LightInject/issues/272) ([pagebrooks](/~https://github.com/pagebrooks))
* NServiceBus Support (17.05.2018) [\#279](/~https://github.com/seesharper/LightInject/issues/279) ([joefeser](/~https://github.com/joefeser))
* ICompositionRoot only works in .net framework, not .net core (17.05.2018) [\#358](/~https://github.com/seesharper/LightInject/issues/358) ([philippe-lavoie](/~https://github.com/philippe-lavoie))
* Memory Leak (16.05.2018) [\#400](/~https://github.com/seesharper/LightInject/issues/400) ([aydany](/~https://github.com/aydany))
* PerScopeLifetime in webapi is not working (17.05.2018) [\#402](/~https://github.com/seesharper/LightInject/issues/402) ([asafp](/~https://github.com/asafp))
* Register Singleton lifetime (09.05.2018) [\#415](/~https://github.com/seesharper/LightInject/issues/415) ([lutaiphong](/~https://github.com/lutaiphong))
## [v5.1.3 (08.05.2018)](/~https://github.com/seesharper/LightInject/tree/v5.1.3)

### [Full Changelog](/~https://github.com/seesharper/LightInject/compare/v5.1.2...v5.1.3)

#### Merged Pull Requests
* Remove zero width space... (26.03.2018) [\#410](/~https://github.com/seesharper/LightInject/pull/410) ([kreediam](/~https://github.com/kreediam))
* Feature/Compilation (08.05.2018) [\#412](/~https://github.com/seesharper/LightInject/pull/412) ([seesharper](/~https://github.com/seesharper))
* Use instance lock instead of static lock (Scope) (08.05.2018) [\#413](/~https://github.com/seesharper/LightInject/pull/413) ([seesharper](/~https://github.com/seesharper))
* Bumped to 5.1.3 for release (08.05.2018) [\#414](/~https://github.com/seesharper/LightInject/pull/414) ([seesharper](/~https://github.com/seesharper))

#### Closed Issues

* Access information about resolved service dependencies (10.03.2018) [\#397](/~https://github.com/seesharper/LightInject/issues/397) ([ilyazolotarov](/~https://github.com/ilyazolotarov))
* Recommended way of implementing Custom lifetime using TTL logic? (03.03.2018) [\#401](/~https://github.com/seesharper/LightInject/issues/401) ([MedAnd](/~https://github.com/MedAnd))
* Unable to resolve type: Model.Ejercicios.Patrones.IFoo, service name: (02.02.2018) [\#406](/~https://github.com/seesharper/LightInject/issues/406) ([Byron2016](/~https://github.com/Byron2016))
* Question: RegisterConstructorDependency for Generics? (07.02.2018) [\#408](/~https://github.com/seesharper/LightInject/issues/408) ([Mike-EEE](/~https://github.com/Mike-EEE))
* Why is there a static/global lock on a lightinject Scope (08.05.2018) [\#411](/~https://github.com/seesharper/LightInject/issues/411) ([Kadajski](/~https://github.com/Kadajski))
27 changes: 0 additions & 27 deletions build/AssemblyVersion.csx

This file was deleted.

66 changes: 66 additions & 0 deletions build/BuildContext.csx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#load "nuget:Dotnet.Build, 0.3.8"
using static FileUtils;
using System.Xml.Linq;

var owner = "seesharper";
var projectName = "LightInject";
var root = FileUtils.GetScriptFolder();
var solutionFolder = Path.Combine(root,"..","src");
var projectFolder = Path.Combine(root, "..", "src", "LightInject");

var testProjectFolder = Path.Combine(root, "..", "src", "LightInject.Tests");

var pathToTestAssembly = Path.Combine(testProjectFolder, "bin","release", "net46", "LightInject.Tests.dll");


var artifactsFolder = CreateDirectory(root, "Artifacts");
var gitHubArtifactsFolder = CreateDirectory(artifactsFolder, "GitHub");
var nuGetArtifactsFolder = CreateDirectory(artifactsFolder, "NuGet");

string[] exceptTheseTypes = new string[] {
"IProxy",
"IInvocationInfo",
"IMethodBuilder",
"IDynamicMethodSkeleton",
"IProxyBuilder",
"IInterceptor",
"MethodInterceptorFactory",
"TargetMethodInfo",
"OpenGenericTargetMethodInfo",
"DynamicMethodBuilder",
"CachedMethodBuilder",
"TargetInvocationInfo",
"InterceptorInvocationInfo",
"CompositeInterceptor",
"InterceptorInfo",
"ProxyDefinition"
};

var pathToReleaseNotes = Path.Combine(gitHubArtifactsFolder, "ReleaseNotes.md");

var version = ReadVersion();

var pathToGitHubReleaseAsset = Path.Combine(gitHubArtifactsFolder, $"{projectName}.{version}.zip");

string ReadVersion()
{
var projectFile = XDocument.Load(Directory.GetFiles(projectFolder, "*.csproj").Single());
var versionPrefix = projectFile.Descendants("VersionPrefix").SingleOrDefault()?.Value;
var versionSuffix = projectFile.Descendants("VersionSuffix").SingleOrDefault()?.Value;
var version = projectFile.Descendants("Version").SingleOrDefault()?.Value;

if (version != null)
{
return version;
}


if (versionSuffix != null)
{
return $"{versionPrefix}-{versionSuffix}";
}
else
{
return versionPrefix;
}
}
80 changes: 0 additions & 80 deletions build/Command.csx

This file was deleted.

68 changes: 0 additions & 68 deletions build/Context.csx

This file was deleted.

19 changes: 0 additions & 19 deletions build/CsProj.csx

This file was deleted.

Loading

0 comments on commit 1b7fe2e

Please sign in to comment.