コード例 #1
0
        public override object VisitDirectives(GraphQLParser.DirectivesContext context)
        {
            var directives = new Directives();

            foreach (var dir in context.directive())
            {
                directives.Add((Directive)Visit(dir));
            }

            return(directives);
        }
コード例 #2
0
        public Directives Directives(IEnumerable <GraphQLDirective> directives)
        {
            var target = new Directives();

            directives?.Apply(d =>
            {
                var dir       = new Directive(Name(d.Name)).WithLocation(d, _body);
                dir.Arguments = Arguments(d.Arguments);
                target.Add(dir);
            });
            return(target);
        }
コード例 #3
0
        public Directives Directives(IEnumerable <GraphQLDirective> directives)
        {
            var target = new Directives();

            if (directives != null)
            {
                foreach (var d in directives)
                {
                    target.Add(Directive(d));
                }
            }

            return(target);
        }
コード例 #4
0
        public Directives Directives(IEnumerable <GraphQLDirective> directives)
        {
            var target = new Directives();

            if (directives != null)
            {
                foreach (var d in directives)
                {
                    var dir = new Directive(Name(d.Name)).WithLocation(d, _body);
                    dir.Arguments = Arguments(d.Arguments);
                    target.Add(dir);
                }
            }

            return(target);
        }
コード例 #5
0
ファイル: Directives.cs プロジェクト: holm0563/graphql-dotnet
 protected bool Equals(Directives directives)
 {
     return(false);
 }
コード例 #6
0
 public FragmentDefinition()
 {
     Directives = new Directives();
 }
コード例 #7
0
ファイル: Operation.cs プロジェクト: cable729/graphql-dotnet
 public Operation()
 {
     OperationType = OperationType.Query;
     Directives    = new Directives();
     Variables     = new VariableDefinitions();
 }
コード例 #8
0
 public FragmentSpread()
 {
     Directives = new Directives();
 }