Beispiel #1
0
        public bool TryGetFieldHandler(
            ITypeCompletionContext context,
            ISortInputTypeDefinition typeDefinition,
            ISortFieldDefinition 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(
     ITypeCompletionContext context,
     ISortInputTypeDefinition typeDefinition,
     ISortFieldDefinition fieldDefinition) => true;
 public override bool CanHandle(
     ITypeCompletionContext context,
     ISortInputTypeDefinition typeDefinition,
     ISortFieldDefinition fieldDefinition) =>
 fieldDefinition.Member is not null;
Beispiel #4
0
 /// <inheritdoc />
 public abstract bool CanHandle(
     ITypeDiscoveryContext context,
     ISortInputTypeDefinition typeDefinition,
     ISortFieldDefinition fieldDefinition);
Beispiel #5
0
 /// <inheritdoc />
 public abstract bool CanHandle(
     ITypeCompletionContext context,
     ISortInputTypeDefinition typeDefinition,
     ISortFieldDefinition fieldDefinition);