public ComponentRegistration(Type type, ComponentActivator activator, IEnumerable <Type>?registrationTypes = null)
        {
            var registrations = new List <Type>(registrationTypes ?? Array.Empty <Type>());

            if (registrations.Count == 0)
            {
                // Every registration needs at least one registration type.
                registrations.Add(type);
            }

            ImplementationType = type;
            RegistrationTypes  = registrations;
            Activator          = activator ?? throw new ArgumentNullException(nameof(activator));
        }
Exemplo n.º 2
0
 public CachingActivator(ComponentActivator activator)
 {
     _activator = activator ?? throw new ArgumentNullException(nameof(activator));
     _result    = null;
 }