/// <summary> /// /// </summary> /// <param name="container"></param> /// <param name="lifetimeManager"></param> public static void RegisterAutoMapperType(this IUnityContainer container, LifetimeManager lifetimeManager = null) { RegisterMappingProfilesFromAssembly(container); container.RegisterMapper(); }
public IUnityContainer RegisterType <T>(LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) { throw new NotImplementedException(); }
public IUnityContainer RegisterType <TFrom, TTo>(LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) where TTo : TFrom { return(RegisterType <TFrom, TTo>(new InjectionMember[0])); }
public IUnityContainer RegisterType(Type t, string name, LifetimeManager lifetimeManager) { throw new NotImplementedException(); }
public IUnityContainer RegisterType <TFrom, TTo>(LifetimeManager lifetimeManager) where TTo : TFrom { throw new NotImplementedException(); }
IUnityContainer IUnityContainer.RegisterType <TFrom, TTo>(LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) { return(this); }
public void RegisterService(ServiceInfo service) { LifetimeManager lifetime = GetLifetime(service); container.RegisterType(service.From, service.To, service.ContractName, lifetime, new InjectionMember[] {}); }
public void ArgumentValidationDiagnosticFailing(Type typeFrom, Type typeTo, string name, LifetimeManager lifetimeManager, Type exception)
public IUnityContainer RegisterType <TFrom, TTo>(LifetimeManager lifetimeManager) where TTo : TFrom { this.Types.Add(typeof(TFrom), typeof(TTo)); return(this); }
public AppConfiguration Use(Type from, Type to, LifetimeManager life) { //throw new NotImplementedException(); Container.RegisterType(from, to, life); return(this); }
public void ArgumentValidationDiagnostic(Type typeFrom, Type typeTo, string name, LifetimeManager lifetimeManager, Type manager)
public AppConfiguration Use <TFrom, TTo>(LifetimeManager life) where TTo : TFrom { //throw new NotImplementedException(); Container.RegisterType <TFrom, TTo>(life); return(this); }
public InstanceRegistration(UnityContainer owner, Type?type, string?name, object?instance, LifetimeManager manager) : base(owner, name, instance?.GetType() ?? type) { // If Disposable register with the container if (manager is IDisposable disposableManager) { owner.Context.Lifetime.Add(disposableManager); } // Setup Manager manager.InUse = true; manager.SetValue(instance, owner.Context.Lifetime); LifetimeManager = manager; ResolveDelegate <PipelineContext> resolver = (ref PipelineContext context) => throw new InvalidOperationException("Instance value no longer available"); Set(typeof(ResolveDelegate <PipelineContext>), resolver); }
public InstanceRegisterEventArgs(Type registeredType, object instance, string name, LifetimeManager lifeTimeManager, bool isDuplicated) : base(registeredType, instance, name, lifeTimeManager) { IsDuplicated = isDuplicated; }
IUnityContainer IUnityContainer.RegisterInstance(Type t, object instance, LifetimeManager lifetimeManager) { throw new System.NotImplementedException(); }
IUnityContainer IUnityContainer.RegisterType(Type from, Type to, string name, LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) { this.Types.Add(from, to); this.MappingInformation.Add(from, new Tuple <string, LifetimeManager>(name, lifetimeManager)); this.RegisterTypeWithNameCalls++; return(this); }
public IUnityContainer RegisterType <TFrom, TTo>(LifetimeManager lifetimeManager) where TTo : TFrom { // ignore return(this); }
public ContainerConfigurer RegisterType <TFrom, TTo>(LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) where TTo : TFrom { _configurers.Add(new TypeConfigurer <TFrom, TTo>(null, lifetimeManager, injectionMembers)); return(this); }
IUnityContainer IUnityContainer.RegisterType <T>(string name, LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) { throw new System.NotImplementedException(); }
public ContainerConfigurer RegisterType <TFrom>(string name, LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) { _configurers.Add(new TypeConfigurer <TFrom>(name, lifetimeManager, injectionMembers)); return(this); }
public IUnityContainer RegisterInstance <TInterface>(TInterface instance, LifetimeManager lifetimeManager) { throw new NotImplementedException(); }
public TypeConfigurer(string name, LifetimeManager lifetimeManager, InjectionMember[] injectionMembers) { _name = name; _lifetimeManager = lifetimeManager; _injectionMembers = injectionMembers; }
public IUnityContainer RegisterType <T>(LifetimeManager lifetimeManager) { throw new NotImplementedException(); }
IUnityContainer IUnityContainer.RegisterType(Type from, Type to, string name, LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) { return(this); }
public IUnityContainer RegisterType(Type from, Type to, string name, LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) { throw new NotImplementedException(); }
IUnityContainer IUnityContainer.RegisterType(Type from, Type to, LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) { throw new System.NotImplementedException(); }
public IUnityContainer RegisterType <TFrom, TTo>(string name, LifetimeManager lifetimeManager, params InjectionMember[] injectionMembers) where TTo : TFrom { throw new NotImplementedException(); }
IUnityContainer IUnityContainer.RegisterInstance <TInterface>(string name, TInterface instance, LifetimeManager lifetimeManager) { throw new System.NotImplementedException(); }
public IUnityContainer RegisterInstance(Type t, string name, object instance, LifetimeManager lifetime) { throw new NotImplementedException(); }
public override IUnityContainer RegisterInstance(Type t, string name, object instance, LifetimeManager lifetime) { ConfigActions.Add(ConfigurationActionRecord.RegisterInstanceAction( t, name, instance, lifetime)); return(this); }