using Util.Dependency; namespace Util.Tests.Samples; /// /// 测试查找接口 /// public interface IA : IB { string Value { get; set; } } /// /// 测试查找接口 /// public interface IB { } /// /// 测试查找接口 /// public interface IC { } /// /// 测试查找接口 /// public interface IG { } /// /// 测试类型 /// public class A : IA, IB { public string Value { get; set; } } /// /// 测试类型 /// public class B : IB, IC { } /// /// 测试类型 /// public abstract class C : IB, IC { } /// /// 测试类型 /// public class D : IC { } /// /// 测试类型 /// public class E : IG { } /// /// 测试类型 /// public class F : IG { } /// /// 测试服务 /// public class TestService : ITestService { public string Value { get; set; } } /// /// 测试服务接口 /// public interface ITestService { string Value { get; set; } } /// /// 测试服务 /// public class TestService2 : ITestService2 { public string Value { get; set; } } /// /// 测试服务接口 /// public interface ITestService2 { string Value { get; set; } } /// /// 测试服务 /// public class TestService3 : ITestService3 { public string Value { get; set; } } /// /// 测试服务接口 /// public interface ITestService3 { string Value { get; set; } } /// /// 测试服务 /// public class TestService4 : ITestService2,ITestService5 { public string Value { get; set; } } /// /// 测试服务接口 /// public interface ITestService4: ITestService3, ISingletonDependency { } /// /// 测试服务接口 /// public interface ITestService5 : ITestService4 { } /// /// 测试服务接口 /// public interface ITestService6 : ISingletonDependency { } /// /// 测试服务 /// public class TestService5 : ITestService6 { } /// /// 测试服务接口 /// public interface ITestService7 : ISingletonDependency { } /// /// 测试服务 /// [Ioc( -2 )] public class TestService7 : ITestService7 { } /// /// 测试服务 /// [Ioc( -1 )] public class TestService8 : ITestService7 { } /// /// 测试服务接口 /// public interface ITestService70 : ISingletonDependency { } /// /// 测试服务 /// [Ioc( 2 )] public class TestService70 : ITestService70 { } /// /// 测试服务 /// [Ioc( 1 )] public class TestService80 : ITestService70 { } /// /// 测试服务 /// public class TestService90 : ITestService70 { } /// /// 测试服务接口 /// public interface ITestService8 : ISingletonDependency { } /// /// 测试服务 /// public class TestService9 : ITestService8 { } /// /// 测试服务 /// public class TestService10 : ITestService8 { } /// /// 测试服务 /// [Ioc( 2 )] public class TestService11 : ITestService8 { } /// /// 测试服务接口 /// public interface ITestService10 : ISingletonDependency { } /// /// 测试服务接口 /// public interface ITestService12 : ITestService10 { } /// /// 测试服务 /// public class TestService12 : ITestService12 { }