Exemplo n.º 1
0
        public Combined2(ISingleton2 first, ITransient2 second)
        {
            if (first == null)
            {
                throw new ArgumentNullException(nameof(first));
            }

            if (second == null)
            {
                throw new ArgumentNullException(nameof(second));
            }

            System.Threading.Interlocked.Increment(ref counter);
        }
Exemplo n.º 2
0
        public Combined2(ISingleton2 first, ITransient2 second)
        {
            if (first == null)
            {
                throw new ArgumentNullException("first");
            }

            if (second == null)
            {
                throw new ArgumentNullException("second");
            }

            Instances++;
        }
Exemplo n.º 3
0
        public Combined2(ISingleton2 first, ITransient2 second)
        {
            if (first == null)
            {
                throw new ArgumentNullException(nameof(first));
            }

            if (second == null)
            {
                throw new ArgumentNullException(nameof(second));
            }

            System.Threading.Interlocked.Increment(ref counter);
        }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
 public Combined2(ISingleton2 singleton)
 {
     Singleton = singleton;
 }
Exemplo n.º 6
0
 public ComponentThatDependsOnMultiSingletons(ISingleton1 singleton1, ISingleton2 singleton2)
 {
     Singleton1 = singleton1;
     Singleton2 = singleton2;
 }
Exemplo n.º 7
0
 public ScopedCombined2(ITransient2 transient, ISingleton2 singleton)
 {
     Transient = transient ?? throw new ArgumentNullException(nameof(transient));
     Singleton = singleton ?? throw new ArgumentNullException(nameof(singleton));
 }