コード例 #1
0
ファイル: ApiDiff.cs プロジェクト: SickheadGames/BRUTE.mono
        static void Generate(AssemblyComparer ac, TextWriter outStream, State state)
        {
            var diffHtml = String.Empty;

            using (var writer = new StringWriter()) {
                state.Output = writer;
                ac.Compare();
                diffHtml = state.Output.ToString();
            }

            if (diffHtml.Length > 0)
            {
                var title = $"{ac.SourceAssembly}.dll";
                if (ac.SourceAssembly != ac.TargetAssembly)
                {
                    title += $" vs {ac.TargetAssembly}.dll";
                }

                state.Formatter.BeginDocument(outStream, $"API diff: {title}");
                state.Formatter.BeginAssembly(outStream);
                outStream.Write(diffHtml);
                state.Formatter.EndAssembly(outStream);
                state.Formatter.EndDocument(outStream);
            }
        }
コード例 #2
0
ファイル: ApiDiff.cs プロジェクト: SickheadGames/BRUTE.mono
        internal static void Generate(Stream firstInfo, Stream secondInfo, TextWriter outStream, State state)
        {
            var ac = new AssemblyComparer(firstInfo, secondInfo, state);

            Generate(ac, outStream, state);
        }