public static ISchemaBuilderStep <AttributeType, TProviderFilter> UseExistingType <TProviderFilter>(this IBuilderStep <AttributeType, TProviderFilter> builder, IAttributeTypeRegistry registry, string alias) where TProviderFilter : class, IProviderTypeFilter { var check = registry.TryGetAttributeType(alias); if (!check.Success) { throw new InvalidOperationException("AttributeType '{0}' is not registered with the supplied IAttributeTypeRegistry".InvariantFormat(alias)); } var existing = check.Result; return(new SchemaBuilderStep <AttributeType, TProviderFilter>(builder.HiveManager, existing)); }
public static ISchemaBuilderStep <AttributeType, TProviderFilter> UseExistingType <TProviderFilter>(this IBuilderStep <AttributeType, TProviderFilter> builder, string alias) where TProviderFilter : class, IProviderTypeFilter { var registry = AttributeTypeRegistry.Current; return(UseExistingType(builder, registry, alias)); }