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);
        }
        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);
        }
        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++;
        }
 public ImportConditionObject2(IExportConditionInterface exportConditionInterface)
 {
     ExportConditionInterface = exportConditionInterface;
 }