-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactory * MoreFodyHelpers * fix nuget * revert --------- Co-authored-by: jeremyli <[email protected]>
- Loading branch information
1 parent
442ae95
commit e73d5e3
Showing
59 changed files
with
414 additions
and
2,306 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.1 | ||
0.1.2 |
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 |
---|---|---|
@@ -1,62 +1,61 @@ | ||
using System; | ||
|
||
namespace InterfaceBaseInvoke.Example | ||
namespace InterfaceBaseInvoke.Example; | ||
|
||
public interface IService | ||
{ | ||
public interface IService | ||
{ | ||
int Property { get; } | ||
void Method(); | ||
} | ||
int Property { get; } | ||
void Method(); | ||
} | ||
|
||
public interface IService1 : IService | ||
{ | ||
public const string Name = nameof(IService1) + "." + nameof(Method); | ||
int IService.Property => 1; | ||
void IService.Method() => Console.WriteLine(Name); | ||
} | ||
public interface IService1 : IService | ||
{ | ||
public const string Name = nameof(IService1) + "." + nameof(Method); | ||
int IService.Property => 1; | ||
void IService.Method() => Console.WriteLine(Name); | ||
} | ||
|
||
public interface IService2 : IService | ||
{ | ||
public const string Name = nameof(IService2) + "." + nameof(Method); | ||
int IService.Property => 2; | ||
void IService.Method() => Console.WriteLine(Name); | ||
} | ||
public interface IService2 : IService | ||
{ | ||
public const string Name = nameof(IService2) + "." + nameof(Method); | ||
int IService.Property => 2; | ||
void IService.Method() => Console.WriteLine(Name); | ||
} | ||
|
||
public interface IService3 | ||
{ | ||
void Method<T>() => Console.WriteLine(typeof(T).Name); | ||
} | ||
public interface IService3 | ||
{ | ||
void Method<T>() => Console.WriteLine(typeof(T).Name); | ||
} | ||
|
||
public interface IService4<T> | ||
{ | ||
void Method() => Console.WriteLine(typeof(T).Name); | ||
} | ||
public interface IService4<T> | ||
{ | ||
void Method() => Console.WriteLine(typeof(T).Name); | ||
} | ||
|
||
public class Service : IService1, IService2, IService3, IService4<string> | ||
{ | ||
public void Method() => throw new InvalidOperationException(); | ||
public int Property => throw new InvalidOperationException(); | ||
|
||
public class Service : IService1, IService2, IService3, IService4<string> | ||
public void Invoke() | ||
{ | ||
public void Method() => throw new InvalidOperationException(); | ||
public int Property => throw new InvalidOperationException(); | ||
|
||
public void Invoke() | ||
{ | ||
Console.WriteLine("Start invoking..."); | ||
this.Base<IService1>().Method(); | ||
this.Base<IService2>().Method(); | ||
this.Base<IService3>().Method<int>(); | ||
this.Base<IService4<string>>().Method(); | ||
Console.WriteLine(this.Base<IService1>().Property); | ||
Console.WriteLine(this.Base<IService2>().Property); | ||
Console.WriteLine("End invoking."); | ||
} | ||
Console.WriteLine("Start invoking..."); | ||
this.Base<IService1>().Method(); | ||
this.Base<IService2>().Method(); | ||
this.Base<IService3>().Method<int>(); | ||
this.Base<IService4<string>>().Method(); | ||
Console.WriteLine(this.Base<IService1>().Property); | ||
Console.WriteLine(this.Base<IService2>().Property); | ||
Console.WriteLine("End invoking."); | ||
} | ||
} | ||
|
||
internal class Program | ||
internal class Program | ||
{ | ||
private static void Main(string[] args) | ||
{ | ||
private static void Main(string[] args) | ||
{ | ||
var service = new Service(); | ||
service.Invoke(); | ||
Console.Read(); | ||
} | ||
var service = new Service(); | ||
service.Invoke(); | ||
Console.Read(); | ||
} | ||
} |
138 changes: 0 additions & 138 deletions
138
src/InterfaceBaseInvoke.Fody/Extensions/CecilExtensions.IsWeaverAssemblyReferenced.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.