예제 #1
0
    public static void InheritDocProcess(TestContext _)
    {
        string outPath            = documentPath + ".after";
        string outPathPrivateTrim = documentPath + ".privateTrim.after";

        var log = new DebugLogger() as ILogger;

        var(replaced, total, trimmed) = InheritDocProcessor.InheritDocs(assemblyPath, documentPath, outPath, referencePaths, Array.Empty <string>(), ApiLevel.Internal, log);
        log.Write(ILogger.Severity.Message, $"replaced {replaced} of {total} and removed {trimmed}");

        using var stmdoc = File.Open(outPath, FileMode.Open);
        processedDocs    = XDocument.Load(stmdoc, LoadOptions.PreserveWhitespace).Root.Element("members");

        (replaced, total, trimmed) = InheritDocProcessor.InheritDocs(assemblyPath, documentPath, outPathPrivateTrim, referencePaths, Array.Empty <string>(), ApiLevel.Private, log);
        log.Write(ILogger.Severity.Message, $"replaced {replaced} of {total} and removed {trimmed}");

        using var stmdocPrivateTrim = File.Open(outPathPrivateTrim, FileMode.Open);
        processedDocsPrivateTrim    = XDocument.Load(stmdocPrivateTrim, LoadOptions.PreserveWhitespace).Root.Element("members");
    }