/// <summary> /// Determines whether this instance can process the given context. The rule will have no effect on the node if it cannot /// process it. /// </summary> /// <param name="context">The context that may be acted upon.</param> /// <returns><c>true</c> if this instance can validate the specified node; otherwise, <c>false</c>.</returns> public override bool ShouldExecute(DocumentConstructionContext context) { return(context.Contains <T1>()); }
/// <summary> /// Determines whether this instance can process the given context. The rule will have no effect on the node if it cannot /// process it. /// </summary> /// <param name="context">The context that may be acted upon.</param> /// <returns><c>true</c> if this instance can validate the specified node; otherwise, <c>false</c>.</returns> public override bool ShouldExecute(DocumentConstructionContext context) { return(context.ActiveNode is InputValueNode && (context.Contains <QueryVariable>() || context.Contains <QueryInputArgument>())); }