Ejemplo n.º 1
0
        public static IStitchingBuilder IgnoreRootTypes(
            this IStitchingBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.AddDocumentRewriter(
                       new RemoveRootTypeRewriter()));
        }
Ejemplo n.º 2
0
        public static IStitchingBuilder IgnoreType(
            this IStitchingBuilder builder,
            NameString typeName)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            typeName.EnsureNotEmpty(nameof(typeName));

            return(builder.AddDocumentRewriter(
                       new RemoveTypeRewriter(typeName)));
        }
Ejemplo n.º 3
0
        public static IStitchingBuilder AddDocumentRewriter(
            this IStitchingBuilder builder,
            RewriteDocumentDelegate rewrite)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (rewrite == null)
            {
                throw new ArgumentNullException(nameof(rewrite));
            }

            return(builder.AddDocumentRewriter(
                       new DelegateDocumentRewriter(rewrite)));
        }