public static void InitializeWith(IDependencyResolverFactory factory) { if (_resolver == null) { _resolver = factory.CreateInstance(); } }
public static void InitializeWith(IDependencyResolverFactory factory) { if (factory == null) { throw new ArgumentNullException("factory"); } _resolver = factory.CreateInstance(); }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> /// <filterpriority>2</filterpriority> public static void Dispose() { lock (SetLocker) { _isInited = false; _resolver = null; _dependencyResolverFactory = null; } }
private static void ConfigureDependencyResolvers(HttpConfiguration config, IDependencyResolverFactory factory) { if (config == null) throw new ArgumentNullException("config"); if (factory == null) throw new ArgumentNullException("factory"); //Web API resolver config.DependencyResolver = factory.CreateApiResolver(); //MVC resolver DependencyResolver.SetResolver(factory.CreateMvcResolver()); }
/// <summary> /// Initialize resolver factory /// </summary> /// <param name="resolverFactory"></param> private static void InitResolverFactory(IDependencyResolverFactory resolverFactory) { lock (SetLocker) { _dependencyResolverFactory = resolverFactory; _dependencyResolverFactory.CreateResolver(); _resolver = _dependencyResolverFactory.GetResolver(); _isInited = true; } Log.Info(String.Format("Configuration complete. DependencyResolverFactory is: {0}", _resolver)); }
/// <summary> /// Configure dependency resolver implementation /// </summary> /// <param name="resolverFactory"> </param> /// <exception cref="NullReferenceException">Resolver factory can't be null</exception> /// <exception cref="InvalidOperationException">DependencyResolver all ready configured</exception> public static void ConfigureResolver(IDependencyResolverFactory resolverFactory) { if (resolverFactory == null) { throw new NullReferenceException("Resolver factory can't be null"); } if (_isInited) { throw new InvalidOperationException("DependencyResolver allready configured"); } InitResolverFactory(resolverFactory); }
private static void ConfigureDependencyResolvers(HttpConfiguration config, IDependencyResolverFactory factory) { if (config == null) { throw new ArgumentNullException("config"); } if (factory == null) { throw new ArgumentNullException("factory"); } //Web API resolver config.DependencyResolver = factory.CreateApiResolver(); //MVC resolver DependencyResolver.SetResolver(factory.CreateMvcResolver()); }
public static void InitializeWith(IDependencyResolverFactory factory) { Checks.Argument.IsNotNull(factory, "factory"); _resolver = factory.CreateInstance(); }
/// <summary> /// Initializes the io C. /// </summary> /// <param name="factory">The factory.</param> public static void InitializeIoC(IDependencyResolverFactory factory) { _resolver = factory.CreateInstance(); }
/// <summary> /// Initializes with the factory. /// </summary> /// <param name="factory">The factory.</param> public static void InitializeWith(IDependencyResolverFactory factory) { _resolver = factory.CreateResolver(); IsInitialized = true; }
public CommandDispatcher(IDependencyResolverFactory resolverFactory) { _resolverFactory = resolverFactory; }
public AllDependencyResolversTestContext(IDependencyResolverFactory factory, ITypeProvider typeProvider) { _factory = factory; _typeProvider = typeProvider; }
public static void InitializeWith(IDependencyResolverFactory factory) { Contract.Requires(Check.Argument.IsNotNull(factory)); _resolver = factory.CreateInstance(); }
public DiServiceBehavior(Type dependencyResolverFactoryType) { DependencyResolverFactoryType = dependencyResolverFactoryType; _factory = Activator.CreateInstance(DependencyResolverFactoryType) as IDependencyResolverFactory; }
public WebJobBootstrapper(IDependencyResolverFactory resolverFactory) { _resolverFactory = resolverFactory; }
public static void InitializeWith(IDependencyResolverFactory resolverFactory) { Check.Argument.IsNotNull(resolverFactory, "resolverFactory"); _innerResolver = resolverFactory.CreateInstance(); }