コード例 #1
0
        public ImportConditionObject2(IExportConditionInterface exportConditionInterface)
        {
            if (exportConditionInterface == null)
            {
                throw new ArgumentNullException("exportConditionInterface");
            }

            if (exportConditionInterface.GetType() != typeof(ExportConditionalObject2))
            {
                throw new ArgumentException(
                          "Should have imported ExportConditionalObject2 got: " + exportConditionInterface.GetType().FullName,
                          "exportConditionInterface");
            }

            System.Threading.Interlocked.Increment(ref counter);
        }
コード例 #2
0
        public ImportConditionObject2(IExportConditionInterface exportConditionInterface)
        {
            if (exportConditionInterface == null)
            {
                throw new ArgumentNullException(nameof(exportConditionInterface));
            }

            if (exportConditionInterface.GetType() != typeof(ExportConditionalObject2))
            {
                throw new ArgumentException(
                    "Should have imported ExportConditionalObject2 got: " + exportConditionInterface.GetType().FullName,
nameof(exportConditionInterface));
            }

            System.Threading.Interlocked.Increment(ref counter);
        }
コード例 #3
0
        public ImportConditionObject3(IExportConditionInterface exportConditionInterface)
        {
            if (exportConditionInterface == null)
            {
                throw new ArgumentNullException("exportConditionInterface");
            }

            if (exportConditionInterface.GetType() != typeof(ExportConditionalObject3))
            {
                throw new ArgumentException(
                          "Should have imported ExportConditionalObject3 got: " + exportConditionInterface.GetType().FullName,
                          "exportConditionInterface");
            }

            Instances++;
        }
コード例 #4
0
        public ImportConditionObject3([ResolveNamed("ExportConditionalObject3")]  IExportConditionInterface exportConditionInterface)
        {
            if (exportConditionInterface == null)
            {
                throw new ArgumentNullException(nameof(exportConditionInterface));
            }

            if (exportConditionInterface.GetType() != typeof(ExportConditionalObject3))
            {
                throw new ArgumentException(
                          "Should have imported ExportConditionalObject3 got: " + exportConditionInterface.GetType().FullName,
                          nameof(exportConditionInterface));
            }

            System.Threading.Interlocked.Increment(ref counter);
        }
コード例 #5
0
        public ImportConditionObject2(IExportConditionInterface exportConditionInterface)
        {
            if (exportConditionInterface == null)
            {
                throw new ArgumentNullException("exportConditionInterface");
            }

            if (exportConditionInterface.GetType() != typeof(ExportConditionalObject2))
            {
                throw new ArgumentException(
                    "Should have imported ExportConditionalObject2 got: " + exportConditionInterface.GetType().FullName,
                    "exportConditionInterface");
            }

            Instances++;
        }
コード例 #6
0
 public ImportConditionObject2(IExportConditionInterface exportConditionInterface)
 {
     ExportConditionInterface = exportConditionInterface;
 }