コード例 #1
0
 public NestedService2(IBasicService2 basicService)
 {
     if (basicService == null)
     {
         throw new ArgumentNullException(nameof(basicService));
     }
 }
コード例 #2
0
ファイル: ConvolutedService.cs プロジェクト: gornikp/IoC-Test
        public ConvolutedService1(IBasicService1 basicService1, IBasicService2 basicService2, IBasicService3 basicService3, INestedService1 nestedService1, INestedService2 nestedService2, INestedService3 nestedService3)
        {
            if (basicService1 == null)
            {
                throw new ArgumentNullException(nameof(basicService1));
            }
            if (basicService2 == null)
            {
                throw new ArgumentNullException(nameof(basicService2));
            }
            if (basicService3 == null)
            {
                throw new ArgumentNullException(nameof(basicService3));
            }
            if (nestedService1 == null)
            {
                throw new ArgumentNullException(nameof(nestedService1));
            }
            if (nestedService2 == null)
            {
                throw new ArgumentNullException(nameof(nestedService2));
            }
            if (nestedService3 == null)
            {
                throw new ArgumentNullException(nameof(nestedService3));
            }

            System.Threading.Interlocked.Increment(ref counter);
        }