public RepositoryTransient2(ISingleton1 singleton, IScopedService1 scopedService1, IScopedService2 scopedService2, IScopedService3 scopedService3, IScopedService4 scopedService4, IScopedService5 scopedService5) { if (singleton == null) { throw new ArgumentNullException(nameof(singleton)); } if (scopedService1 == null) { throw new ArgumentNullException(nameof(scopedService1)); } if (scopedService2 == null) { throw new ArgumentNullException(nameof(scopedService2)); } if (scopedService3 == null) { throw new ArgumentNullException(nameof(scopedService3)); } if (scopedService4 == null) { throw new ArgumentNullException(nameof(scopedService4)); } if (scopedService5 == null) { throw new ArgumentNullException(nameof(scopedService5)); } Interlocked.Increment(ref counter); }
public void Prepare() { this.container[typeof(ITransient1)] = () => new ScopedTransient(); ISingleton1 singleton = (ISingleton1)this.parentAdapter.Resolve(typeof(ISingleton1)); this.container[typeof(ICombined1)] = () => new ScopedCombined1(new ScopedTransient(), singleton); this.container[typeof(ICombined2)] = () => new ScopedCombined2(new ScopedTransient(), singleton); this.container[typeof(ICombined3)] = () => new ScopedCombined3(new ScopedTransient(), singleton); }
public SimpleCombined1(ISingleton1 first, ITransient1 second) { if (first == null) { throw new ArgumentNullException(nameof(first)); } if (second == null) { throw new ArgumentNullException(nameof(second)); } }
public Combined1(ISingleton1 first, ITransient1 second) { if (first == null) { throw new ArgumentNullException("first"); } if (second == null) { throw new ArgumentNullException("second"); } System.Threading.Interlocked.Increment(ref counter); }
public Combined1(ISingleton1 first, ITransient1 second) { if (first == null) { throw new ArgumentNullException(nameof(first)); } if (second == null) { throw new ArgumentNullException(nameof(second)); } System.Threading.Interlocked.Increment(ref counter); }
public Combined1(ISingleton1 first, ITransient1 second) { if (first == null) { throw new ArgumentNullException("first"); } if (second == null) { throw new ArgumentNullException("second"); } Instances++; }
public RepositoryTransient3(ISingleton1 singleton, IScopedService scopedService) { if (singleton == null) { throw new ArgumentNullException(nameof(singleton)); } if (scopedService == null) { throw new ArgumentNullException(nameof(scopedService)); } Interlocked.Increment(ref counter); }
public Complex( ISingleton1 singleton1, ISingleton2 singleton2, ISingleton3 singleton3, Combined1 combined1, Combined2 combined2, Combined3 combined3) { Singleton1 = singleton1; Singleton2 = singleton2; Singleton3 = singleton3; Combined1 = combined1; Combined2 = combined2; Combined3 = combined3; }
public ScopedCombined1(ITransient1 transient, ISingleton1 singleton) { if (transient == null) { throw new ArgumentNullException(nameof(transient)); } if (singleton == null) { throw new ArgumentNullException(nameof(singleton)); } if (!(transient is ScopedTransient)) { throw new ArgumentException("transient should be of type ScopedTransient"); } System.Threading.Interlocked.Increment(ref counter); }
public ScopedCombined1(ITransient1 transient, ISingleton1 singleton) { if (transient == null) { throw new ArgumentNullException(nameof(transient)); } if (singleton == null) { throw new ArgumentNullException(nameof(singleton)); } if (!(transient is ScopedTransient)) { throw new ArgumentException("transient should be of type ScopedTransient"); } System.Threading.Interlocked.Increment(ref counter); }
public ScopedCombined3(ITransient1 transient, ISingleton1 singleton) { if (transient == null) { throw new ArgumentNullException("transient"); } if (singleton == null) { throw new ArgumentNullException("singleton"); } if (!(transient is ScopedTransient)) { throw new ArgumentException("transient should be of type ScopedTransient"); } Instances++; }
public Combined1(ISingleton1 singleton) { Singleton = singleton; }
public Combined12(ISingleton1 first, ITransient1 second) { }
public ComponentThatDependsOnMultiSingletons(ISingleton1 singleton1, ISingleton2 singleton2) { Singleton1 = singleton1; Singleton2 = singleton2; }
public ScopedCombined1(ITransient1 transient, ISingleton1 singleton) { Transient = transient ?? throw new ArgumentNullException(nameof(transient)); Singleton = singleton ?? throw new ArgumentNullException(nameof(singleton)); }
public void Singleton() { ISingleton1 value = _benchmark.Singleton(); Assert.IsType <Singleton1>(value); }