public ProviderRegistrationAttribute(ProviderRegistrationType knownType) { if (knownType == ProviderRegistrationType.Custom) throw RuntimeFailure.UseProviderRegistrationAttributeOverload("knownType", knownType); this.registration = ProviderRegistration.FromKind(knownType); }
public ProviderRegistrationAttribute(Type type) { if (type == null) throw new ArgumentNullException("type"); if (!typeof(IProviderRegistration).IsAssignableFrom(type)) throw Failure.NotAssignableFrom("type", typeof(IProviderRegistration), type); this.registration = (IProviderRegistration) Activator.CreateInstance(type); }
public ProviderRegistrationAttribute(ProviderRegistrationType knownType) { if (knownType == ProviderRegistrationType.Custom) { throw RuntimeFailure.UseProviderRegistrationAttributeOverload("knownType", knownType); } this.registration = ProviderRegistration.FromKind(knownType); }
static IEnumerable <Type> GetRootProviderTypes(Assembly a) { IProviderRegistration registration = AssemblyInfo.GetAssemblyInfo(a).GetProviderRegistration(); ProviderRegistrationContext context = new ProviderRegistrationContext(a); registration.RegisterRootProviderTypes(context); return(context.EnumerateRoots()); }
private static IEnumerable <ProviderValueSource> ExtractFromTypes(Assembly a) { IProviderRegistration registration = AssemblyInfo.GetAssemblyInfo(a).GetProviderRegistration(); ProviderRegistrationContext context = new ProviderRegistrationContext(a); registration.RegisterProviderTypes(context); return(context.EnumerateValueSources()); }
public ProviderRegistrationAttribute(Type type) { if (type == null) { throw new ArgumentNullException("type"); } if (!typeof(IProviderRegistration).GetTypeInfo().IsAssignableFrom(type)) { throw Failure.NotAssignableFrom("type", typeof(IProviderRegistration), type); } this.registration = (IProviderRegistration)Activator.CreateInstance(type); }
public CompositeProviderRegistration(IProviderRegistration[] items) { this.items = items; }