2 // The main differences with mono-api-diff are:
3 // * this tool directly produce HTML similar to gdiff.sh used for Xamarin.iOS
4 // * this tool reports changes in an "evolutionary" way, not in a breaking way,
5 // i.e. it does not assume the source assembly is right (but simply older)
6 // * the diff .xml output was not easy to convert back into the HTML format
7 // that gdiff.sh produced
10 // Sebastien Pouliot <sebastien@xamarin.com>
12 // Copyright 2013 Xamarin Inc. http://www.xamarin.com
14 // Permission is hereby granted, free of charge, to any person obtaining
15 // a copy of this software and associated documentation files (the
16 // "Software"), to deal in the Software without restriction, including
17 // without limitation the rights to use, copy, modify, merge, publish,
18 // distribute, sublicense, and/or sell copies of the Software, and to
19 // permit persons to whom the Software is furnished to do so, subject to
20 // the following conditions:
22 // The above copyright notice and this permission notice shall be
23 // included in all copies or substantial portions of the Software.
25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 namespace Xamarin.ApiDiff {
39 public static class State {
40 static TextWriter output;
42 public static TextWriter Output {
48 set { output = value; }
51 public static string Assembly { get; set; }
52 public static string Namespace { get; set; }
53 public static string Type { get; set; }
54 public static string BaseType { get; set; }
56 public static int Indent { get; set; }
61 public static int Main (string[] args)
63 if (args.Length < 2) {
64 Console.WriteLine ("mono-api-html reference.xml assembly.xml [diff.html]");
69 string input = args [0];
70 string output = args [1];
71 var ac = new AssemblyComparer (input, output);
73 State.Output = new StreamWriter (args [2]);
77 Console.WriteLine (e);