Program.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the Apache 2.0 License.
  3. // See the LICENSE file in the project root for more information.
  4. using System;
  5. using System.Linq;
  6. using System.Reactive.Linq;
  7. using System.Reflection;
  8. namespace ApiCompare
  9. {
  10. class Program
  11. {
  12. static void Main()
  13. {
  14. var observable = typeof(Observable).GetMethods(BindingFlags.Public | BindingFlags.Static).Select(m => m.Name).Distinct();
  15. var asyncObservable = typeof(AsyncObservable).GetMethods(BindingFlags.Public | BindingFlags.Static).Select(m => m.Name).Distinct();
  16. var exclude = new[]
  17. {
  18. "AsObservable", // Trivially renamed to AsAsyncObservable.
  19. "And", // Postponing patterns.
  20. "Then", // Postponing patterns.
  21. "When", // Postponing patterns.
  22. "If", // Postponing imperative operators.
  23. "DoWhile", // Postponing imperative operators.
  24. "Case", // Postponing imperative operators.
  25. "For", // Postponing imperative operators.
  26. "While", // Postponing imperative operators.
  27. "Collect", // Postponing push-to-pull adapters.
  28. "Chunkify", // Postponing push-to-pull adapters.
  29. "GetEnumerator", // Postponing push-to-pull adapters.
  30. "Latest", // Postponing push-to-pull adapters.
  31. "MostRecent", // Postponing push-to-pull adapters.
  32. "Next", // Postponing push-to-pull adapters.
  33. "ToEnumerable", // Postponing push-to-pull adapters.
  34. };
  35. var missing = observable.Except(exclude).Except(asyncObservable).OrderBy(m => m);
  36. foreach (var m in missing)
  37. {
  38. Console.WriteLine(m);
  39. }
  40. Console.WriteLine();
  41. Console.WriteLine("Count = " + missing.Count());
  42. }
  43. }
  44. }