internal static bool CalcIssuer(Type i, Type b, [ConsumerBroadcasterDispatcher(true)][_0008._0012(2)] out Type _0004, [_0008._0012(new byte[] { 2, 1 })][ConsumerBroadcasterDispatcher(true)] out GDBD.Specifications.AdapterClassSpec <object> _0005) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 if (i.CallReader()) { Type genericTypeDefinition = i.GetGenericTypeDefinition(); string fullName = genericTypeDefinition.FullName; RegistryTest registryTest = _QueueTest.FirstOrDefault((RegistryTest P_0) => P_0._0001() == fullName); if (registryTest != null) { Type type = genericTypeDefinition.RevertReader().GetType(registryTest._0002()); Type type2 = genericTypeDefinition.RevertReader().GetType(registryTest._0003()); if (type != null && type2 != null) { MethodInfo methodInfo = type2.GetMethods().FirstOrDefault((MethodInfo spec) => spec.Name == "CreateRange" && spec.GetParameters().Length == 1); if (methodInfo != null) { _0004 = type.MakeGenericType(b); MethodInfo v = methodInfo.MakeGenericMethod(b); _0005 = ConfigProperty._0001()._0001(v); return(true); } } } } _0004 = null; _0005 = null; return(false); }
public void For_ParamOfTypes_AddsRegistration() { var registry = new RegistryTest(); registry.For(typeof (IFoo)).ImplementedBy<Foo>(); var container = InstallInContainer(registry); Verify<IFoo, Foo>(container); }
public void For_GenericEntry_AddsRegistration() { var registry = new RegistryTest(); registry.For<IFoo>().ImplementedBy<Foo>(); var container = InstallInContainer(registry); Verify<IFoo, Foo>(container); }
public void For_GenericWithTwoForwards_AddsRegistration() { var registry = new RegistryTest(); registry.For<FooBar, Foo, IFoo>().ImplementedBy<FooBar>(); var container = InstallInContainer(registry); Verify<IFoo, FooBar>(container); Verify<Foo, FooBar>(container); Verify<FooBar, FooBar>(container); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); // How to iterate through a directory tree RecursiveFileSearch.Run(); StackBasedIteration.Run(@"C:\SAJ"); FileSysInfo.Run(); CreateFileOrFolder.Run(); SimpleFileCopy.Run(); SimpleFileMove.Run(); SimpleFileDelete.Run(); WriteTextFile.Run(); ReadFromFile.Run(); // How to create a key in the registry RegistryTest.Run(); }
internal static bool InstantiateIssuer(Type setup, Type result, Type consumer, [ConsumerBroadcasterDispatcher(true)][_0008._0012(2)] out Type _0005, [ConsumerBroadcasterDispatcher(true)][_0008._0012(new byte[] { 2, 1 })] out GDBD.Specifications.AdapterClassSpec <object> _0006) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 if (setup.CallReader()) { Type genericTypeDefinition = setup.GetGenericTypeDefinition(); string fullName = genericTypeDefinition.FullName; RegistryTest registryTest = proxyTest.FirstOrDefault((RegistryTest P_0) => P_0._0001() == fullName); if (registryTest != null) { Type type = genericTypeDefinition.RevertReader().GetType(registryTest._0002()); Type type2 = genericTypeDefinition.RevertReader().GetType(registryTest._0003()); if (type != null && type2 != null) { MethodInfo methodInfo = type2.GetMethods().FirstOrDefault(delegate(MethodInfo v) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 ParameterInfo[] parameters = v.GetParameters(); return(v.Name == "CreateRange" && parameters.Length == 1 && parameters[0].ParameterType.CallReader() && parameters[0].ParameterType.GetGenericTypeDefinition() == typeof(IEnumerable <>)); }); if (methodInfo != null) { _0005 = type.MakeGenericType(result, consumer); MethodInfo v2 = methodInfo.MakeGenericMethod(result, consumer); _0006 = ConfigProperty._0001()._0001(v2); return(true); } } } } _0005 = null; _0006 = null; return(false); }
public void GetRegisteredRelationValues_DoesNot_Register_Readonly() { var registry = new RegistryTest(); Assert.False(registry.IsRegisteredRelation(registry.Something)); }
public void FromAssembly_TestAssembly_AddsRegistration() { var registry = new RegistryTest(); registry.FromAssembly(this.GetType().Assembly).BasedOn<IFoo>().WithService.Base(); var container = InstallInContainer(registry); VerifyAll(container); }
public void FromAssemblyNamed_TestAssembly_AddsRegistration() { var registry = new RegistryTest(); registry.FromAssemblyNamed("GotFour.Windsor.Tests").BasedOn<IFoo>().WithService.Base(); var container = InstallInContainer(registry); VerifyAll(container); }
public void AddFacility_StartableFacility_IsAddedToContainer() { var registry = new RegistryTest(); registry.AddFacility<StartableFacility>(); var container = InstallInContainer(registry); Expect(container.Kernel.GetFacilities(), Has.Some.TypeOf<StartableFacility>()); }
public void Custom_ContainerRegisterFooForIFoo_Resolves() { var registry = new RegistryTest(); registry.Custom(x => x.Register(Component.For<IFoo>().ImplementedBy<Foo>())); var container = InstallInContainer(registry); Verify<IFoo, Foo>(container); }
public void AddComponent_FooForIFoo_Resolves() { var registry = new RegistryTest(); registry.AddComponent<IFoo, Foo>(); var container = InstallInContainer(registry); Verify<IFoo, Foo>(container); }
public void FromAssemblyContaining_TestAssembly_AddsRegistration() { var registry = new RegistryTest(); registry.FromAssemblyContaining(typeof (IFoo)).BasedOn<IFoo>().WithService.Base(); var container = InstallInContainer(registry); VerifyAll(container); }
internal bool _0001(RegistryTest P_0) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 return(P_0._0001() == this._0001); }