Exemple #1
0
    public static ISchemaTypeDescriptor Authorize(
        this ISchemaTypeDescriptor self)
    {
        if (self == null)
        {
            throw new ArgumentNullException(nameof(self));
        }

        return(self.Directive(new AuthorizeDirective()));
    }
Exemple #2
0
    public static ISchemaTypeDescriptor Authorize(
        this ISchemaTypeDescriptor self,
        string policy,
        params string[] roles)
    {
        if (self == null)
        {
            throw new ArgumentNullException(nameof(self));
        }

        return(self.Directive(new AuthorizeDirective(policy, roles)));
    }
 protected virtual void Configure(ISchemaTypeDescriptor descriptor)
 {
 }
 protected override void Configure(ISchemaTypeDescriptor descriptor)
 {
     descriptor.Description("Description");
 }
Exemple #5
0
 protected override void Configure(ISchemaTypeDescriptor descriptor) =>
 descriptor.Description("This is my schema description that can be accessed by introspection");