Exemplo n.º 1
0
    protected override InputObjectTypeDefinition CreateDefinition(
        ITypeDiscoveryContext context)
    {
        var descriptor = SortInputTypeDescriptor.FromSchemaType(
            context.DescriptorContext,
            GetType(),
            context.Scope);

        _configure !(descriptor);
        _configure = null;

        return(descriptor.CreateDefinition());
    }
Exemplo n.º 2
0
    protected override InputObjectTypeDefinition CreateDefinition(
        ITypeDiscoveryContext context)
    {
        var descriptor = SortInputTypeDescriptor.New <T>(
            context.DescriptorContext,
            typeof(T),
            context.Scope);

        _configure !(descriptor);
        _configure = null;

        return(descriptor.CreateDefinition());
    }
 /// <inheritdoc />
 public ISortConventionDescriptor Configure <TSortType, TRuntimeType>(
     ConfigureSortInputType <TRuntimeType> configure)
     where TSortType : SortInputType <TRuntimeType> =>
 Configure(
     Context.TypeInspector.GetTypeRef(
         typeof(TSortType),
         TypeContext.Input,
         Definition.Scope),
     d =>
 {
     configure.Invoke(
         SortInputTypeDescriptor.From <TRuntimeType>(
             (SortInputTypeDescriptor)d,
             Definition.Scope));
 });
Exemplo n.º 4
0
 public static SortInputTypeDescriptor <T> From <T>(
     SortInputTypeDescriptor descriptor,
     string?scope = null) =>
 From <T>(descriptor.Context, descriptor.Definition, scope);