Exemplo n.º 1
0
        public static DocumentNode Rewrite(DocumentNode document, ISchema schema)
        {
            if (document is null)
            {
                throw new ArgumentNullException(nameof(document));
            }

            if (schema is null)
            {
                throw new ArgumentNullException(nameof(schema));
            }

            DocumentNode current = document;

            current = EntityIdRewriter.Rewrite(current, schema);
            current = TypeNameQueryRewriter.Rewrite(current);
            return(RemoveClientDirectivesRewriter.Rewrite(current));
        }
Exemplo n.º 2
0
        public static DocumentNode Rewrite(DocumentNode document, ISchema schema)
        {
            var rewriter = new EntityIdRewriter();

            return(rewriter.RewriteDocument(document, new Context(schema)));
        }