Пример #1
0
 public static ISchemaBuilder AddDirectiveType(
     this ISchemaBuilder builder,
     string name,
     DirectiveLocation location,
     Func <IDirectiveTypeDescriptor, IDirectiveTypeDescriptor> configure) =>
 builder.AddDirectiveType(new DirectiveType(x =>
                                            configure(x.Name(name).Location(location))));
        public static ISchemaBuilder AddAuthorizeDirectiveType(
            this ISchemaBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.AddDirectiveType <AuthorizeDirectiveType>());
        }
 public static ISchemaBuilder AddExportDirectiveType(
     this ISchemaBuilder builder)
 {
     return(builder.AddDirectiveType <ExportDirectiveType>());
 }
Пример #4
0
 public static ISchemaBuilder AddCostDirectiveType(
     this ISchemaBuilder builder) =>
 builder.AddDirectiveType <CostDirectiveType>();