public ProviderRegistrationAttribute(ProviderRegistrationType knownType) { if (knownType == ProviderRegistrationType.Custom) throw RuntimeFailure.UseProviderRegistrationAttributeOverload("knownType", knownType); this.registration = ProviderRegistration.FromKind(knownType); }
internal static IProviderRegistration FromKind(ProviderRegistrationType kind) { if (kind == ProviderRegistrationType.Default) return ProviderRegistration.Default; else return ProviderRegistration.Explicit; }
public ProviderRegistrationAttribute(ProviderRegistrationType knownType) { if (knownType == ProviderRegistrationType.Custom) { throw RuntimeFailure.UseProviderRegistrationAttributeOverload("knownType", knownType); } this.registration = ProviderRegistration.FromKind(knownType); }
internal static IProviderRegistration FromKind(ProviderRegistrationType kind) { if (kind == ProviderRegistrationType.Default) { return(ProviderRegistration.Default); } else { return(ProviderRegistration.Explicit); } }
public static ArgumentOutOfRangeException UseProviderRegistrationAttributeOverload( string argumentName, ProviderRegistrationType type) { return Failure.Prepare(new ArgumentOutOfRangeException(argumentName, type, SR.UseProviderRegistrationAttributeOverload())); }
public static ArgumentOutOfRangeException UseProviderRegistrationAttributeOverload( string argumentName, ProviderRegistrationType type) { return(Failure.Prepare(new ArgumentOutOfRangeException(argumentName, type, SR.UseProviderRegistrationAttributeOverload()))); }