Exemplo n.º 1
0
 internal SortField(SortFieldDefinition definition, int index)
     : base(definition, index)
 {
     Member  = definition.Member;
     Handler = definition.Handler ??
               throw new InvalidOperationException();
 }
Exemplo n.º 2
0
        public bool TryGetFieldHandler(
            ITypeDiscoveryContext context,
            SortInputTypeDefinition typeDefinition,
            SortFieldDefinition fieldDefinition,
            [NotNullWhen(true)] out ISortFieldHandler?handler)
        {
            foreach (ISortFieldHandler sortFieldHandler in _provider.FieldHandlers)
            {
                if (sortFieldHandler.CanHandle(context, typeDefinition, fieldDefinition))
                {
                    handler = sortFieldHandler;
                    return(true);
                }
            }

            handler = null;
            return(false);
        }
 public override bool CanHandle(
     ITypeDiscoveryContext context,
     SortInputTypeDefinition typeDefinition,
     SortFieldDefinition fieldDefinition) => true;
Exemplo n.º 4
0
 /// <inheritdoc />
 public abstract bool CanHandle(
     ITypeDiscoveryContext context,
     SortInputTypeDefinition typeDefinition,
     SortFieldDefinition fieldDefinition);