-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for FactoryOfMethods (#110)
- Loading branch information
1 parent
a335d46
commit a361ba1
Showing
13 changed files
with
934 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '5.0.102' | ||
dotnet-version: '5.0.x' | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Build | ||
|
@@ -66,7 +66,7 @@ jobs: | |
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '5.0.102' | ||
dotnet-version: '5.0.x' | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Build | ||
|
@@ -83,7 +83,7 @@ jobs: | |
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '5.0.102' | ||
dotnet-version: '5.0.x' | ||
- name: Setup MSbuild | ||
uses: microsoft/[email protected] | ||
- name: Setup nuget | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
|
||
namespace StrongInject | ||
{ | ||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)] | ||
public sealed class FactoryOfAttribute : Attribute | ||
{ | ||
public FactoryOfAttribute(Type type, Scope scope = Scope.InstancePerResolution) | ||
{ | ||
Type = type; | ||
Scope = scope; | ||
} | ||
public Type Type { get; } | ||
public Scope Scope { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
using Microsoft.CodeAnalysis; | ||
|
||
namespace StrongInject.Generator | ||
{ | ||
internal record FactoryOfMethod(FactoryMethod Underlying, ITypeSymbol FactoryOfType){} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.