private ICompletedDependencyDescriptor OnBeforeCompletion(
            Action <ITypeCompletionContext, T> configure)
        {
            var configuration = new TypeConfiguration <T>();

            configuration.Definition = Definition;
            configuration.On         = ApplyConfigurationOn.Completion;
            configuration.Configure  = configure;
            Definition.Configurations.Add(configuration);

            return(new CompletedDependencyDescriptor <T>(configuration));
        }
Esempio n. 2
0
        ICompletedDependencyDescriptor IDescriptorExtension <T>
        .OnBeforeCompletion(
            Action <ICompletionContext, T> configure)
        {
            var configuration = new TypeConfiguration <T>();

            configuration.Definition = Definition;
            configuration.Kind       = ConfigurationKind.Completion;
            configuration.Configure  = configure;
            Definition.Configurations.Add(configuration);

            return(new CompletedDependencyDescriptor <T>(configuration));
        }
Esempio n. 3
0
        private ICompletedDependencyDescriptor OnBeforeCompletion(
            Action <ITypeCompletionContext, T> configure)
        {
            var configuration = new TypeConfiguration <T>
            {
                Definition = Definition,
                On         = ApplyConfigurationOn.Completion,
                Configure  = configure
            };

            Definition.Configurations.Add(configuration);

            return(new CompletedDependencyDescriptor <T>(Context.TypeInspector, configuration));
        }
Esempio n. 4
0
        INamedDependencyDescriptor IDescriptorExtension <T> .OnBeforeNaming(
            Action <ICompletionContext, T> configure)
        {
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            var configuration = new TypeConfiguration <T>();

            configuration.Definition = Definition;
            configuration.Kind       = ConfigurationKind.Naming;
            configuration.Configure  = configure;
            Definition.Configurations.Add(configuration);

            return(new NamedDependencyDescriptor <T>(configuration));
        }
        private INamedDependencyDescriptor OnBeforeNaming(
            Action <ITypeCompletionContext, T> configure)
        {
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            var configuration = new TypeConfiguration <T>();

            configuration.Definition = Definition;
            configuration.On         = ApplyConfigurationOn.Naming;
            configuration.Configure  = configure;
            Definition.Configurations.Add(configuration);

            return(new NamedDependencyDescriptor <T>(configuration));
        }
Esempio n. 6
0
        private INamedDependencyDescriptor OnBeforeNaming(
            Action <ITypeCompletionContext, T> configure)
        {
            if (configure is null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            var configuration = new TypeConfiguration <T>
            {
                Definition = Definition,
                On         = ApplyConfigurationOn.Naming,
                Configure  = configure
            };

            Definition.Configurations.Add(configuration);

            return(new NamedDependencyDescriptor <T>(Context.TypeInspector, configuration));
        }
Esempio n. 7
0
 public NamedDependencyDescriptor(TypeConfiguration <T> configuration)
     : base(configuration)
 {
 }
Esempio n. 8
0
 public DependencyDescriptor(TypeConfiguration <T> configuration)
 {
     _configuration = configuration
                      ?? throw new ArgumentNullException(nameof(configuration));
 }
Esempio n. 9
0
 public CompletedDependencyDescriptor(
     ITypeInspector typeInspector,
     TypeConfiguration <T> configuration)
     : base(typeInspector, configuration)
 {
 }
 protected DependencyDescriptorBase(TypeConfiguration <T> configuration)
 {
     _configuration = configuration
                      ?? throw new ArgumentNullException(nameof(configuration));
 }