Sfoglia il codice sorgente

Adding a little tool to spot API differences.

Bart De Smet 8 anni fa
parent
commit
fd1c152fa4
1 ha cambiato i file con 16 aggiunte e 3 eliminazioni
  1. 16 3
      AsyncRx.NET/ApiCompare/Program.cs

+ 16 - 3
AsyncRx.NET/ApiCompare/Program.cs

@@ -1,12 +1,25 @@
-using System;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information. 
+
+using System;
+using System.Linq;
+using System.Reactive.Linq;
+using System.Reflection;
 
 namespace ApiCompare
 {
     class Program
     {
-        static void Main(string[] args)
+        static void Main()
         {
-            Console.WriteLine("Hello World!");
+            var observable = typeof(Observable).GetMethods(BindingFlags.Public | BindingFlags.Static).Select(m => m.Name).Distinct();
+            var asyncObservable = typeof(AsyncObservable).GetMethods(BindingFlags.Public | BindingFlags.Static).Select(m => m.Name).Distinct();
+
+            foreach (var m in observable.Except(asyncObservable).OrderBy(m => m))
+            {
+                Console.WriteLine(m);
+            }
         }
     }
 }