public static ISchemaBuilder AddConvention <T>( this ISchemaBuilder builder, CreateConvention conventionFactory, string?scope = null) { if (builder is null) { throw new ArgumentNullException(nameof(builder)); } return(builder.AddConvention(typeof(T), conventionFactory, scope)); }
public static IRequestExecutorBuilder AddConvention <T>( this IRequestExecutorBuilder builder, CreateConvention conventionFactory, string?scope = null) { if (builder is null) { throw new ArgumentNullException(nameof(builder)); } return(builder.ConfigureSchema( b => b.AddConvention(typeof(T), conventionFactory, scope))); }
public ISchemaBuilder AddConvention(Type convention, CreateConvention factory) { if (convention is null) { throw new ArgumentNullException(nameof(convention)); } if (factory is null) { throw new ArgumentNullException(nameof(factory)); } _conventions[convention] = factory; return(this); }
public static ISchemaBuilder TryAddConvention( this ISchemaBuilder builder, Type convention, CreateConvention conventionFactory, string?scope = null) { if (builder is null) { throw new ArgumentNullException(nameof(builder)); } if (convention is null) { throw new ArgumentNullException(nameof(convention)); } return(builder.TryAddConvention(convention, conventionFactory, scope)); }
public static IRequestExecutorBuilder TryAddConvention( this IRequestExecutorBuilder builder, Type convention, CreateConvention factory, string?scope = null) { if (builder is null) { throw new ArgumentNullException(nameof(builder)); } if (convention is null) { throw new ArgumentNullException(nameof(convention)); } if (factory is null) { throw new ArgumentNullException(nameof(factory)); } return(builder.ConfigureSchema(b => b.TryAddConvention(convention, factory, scope))); }
public static IRequestExecutorBuilder TryAddConvention <T>( this IRequestExecutorBuilder builder, CreateConvention conventionFactory, string?scope = null) where T : IConvention => builder.ConfigureSchema(b => b.TryAddConvention(typeof(T), conventionFactory, scope));
public static ISchemaBuilder TryAddConvention <T>( this ISchemaBuilder builder, CreateConvention conventionFactory, string?scope = null) where T : IConvention => builder.TryAddConvention(typeof(T), conventionFactory, scope);