public static IError CreateNonNullError <T>( ISortField field, IValueNode value, ISortVisitorContext <T> context) { ISortInputType sortType = context.Types.OfType <ISortInputType>().First(); return(ErrorBuilder.New() .SetMessage( DataResources.ErrorHelper_CreateNonNullError, context.Fields.Peek().Name, sortType.Visualize()) .AddLocation(value) .SetExtension("expectedType", new NonNullType(field.Type).Visualize()) .SetExtension("sortType", sortType.Visualize()) .Build()); }
public static void ReportError <T> (this ISortVisitorContext <T> context, IError error) => context.Errors.Add(error);
public static void PushInstance <T>( this ISortVisitorContext <T> context, T nextExpression) => context.Instance.Push(nextExpression);
public static T PopInstance <T>(this ISortVisitorContext <T> context) => context.Instance.Pop();
public static T GetInstance <T>( this ISortVisitorContext <T> context) => context.Instance.Peek();