Skip to content

Instantly share code, notes, and snippets.

@lambertj
Forked from davidfowl/Example1.cs
Created January 8, 2018 12:34
Show Gist options
  • Select an option

  • Save lambertj/c4e5933387d42aa0f8ee73824d0b181f to your computer and use it in GitHub Desktop.

Select an option

Save lambertj/c4e5933387d42aa0f8ee73824d0b181f to your computer and use it in GitHub Desktop.

Revisions

  1. @davidfowl davidfowl revised this gist Apr 23, 2016. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions _Platform.cs
    Original file line number Diff line number Diff line change
    @@ -20,9 +20,7 @@ interface INetStandard10
    interface INetStandard11 : INetStandard10
    {
    void ConcurrentCollections();
    void LinqParallel();
    void Compression();
    void HttpClient();
    void InteropServices();
    }

    interface INetStandard12 : INetStandard11
    @@ -35,8 +33,6 @@ interface INetStandard13 : INetStandard12
    void FileSystem();
    void Console();
    void ThreadPool();
    void Crypto();
    void WebSockets();
    void Process();
    void Sockets();

  2. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions _Platform.cs
    Original file line number Diff line number Diff line change
    @@ -63,6 +63,8 @@ interface INetFramework45 : INetStandard11
    void Crypto();
    void WebSockets();
    void Process();
    void Sockets();

    void AppDomain();
    void Xml();
    void Drawing();
  3. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Example1.cs
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ public void Net45Application(INetFramework45 platform)

    // This fails because .NET Framework 4.5 does not implement .NET Standard 1.3
    // Argument 1: cannot convert from 'Analogy.INetFramework45' to 'Analogy.INetStandard13'
    NetStandardLibrary13(project);
    NetStandardLibrary13(platform);
    }

    public void NetStandardLibrary13(INetStandard13 platform)
  4. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions _Platform.cs
    Original file line number Diff line number Diff line change
    @@ -64,6 +64,7 @@ interface INetFramework45 : INetStandard11
    void WebSockets();
    void Process();
    void AppDomain();
    void Xml();
    void Drawing();
    void SystemWeb();
    void WPF();
  5. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion _Platform.cs
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,6 @@ interface INetStandard10
    void Primitives();
    void Reflection();
    void Tasks();
    void Xml();
    void Collections();
    void Linq();
    }
  6. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions _Platform.cs
    Original file line number Diff line number Diff line change
    @@ -96,6 +96,13 @@ interface INetFramework462 : INetFramework461, INetStandard15
    {
    // TODO: .NET Framework 4.6 specific APIs
    }

    // Mono

    interface IMono43 : INetFramework46
    {
    void MonoSpecificApi();
    }

    // Windows Universal Platform

  7. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions _Platform.cs
    Original file line number Diff line number Diff line change
    @@ -64,6 +64,7 @@ interface INetFramework45 : INetStandard11
    void Crypto();
    void WebSockets();
    void Process();
    void AppDomain();
    void Drawing();
    void SystemWeb();
    void WPF();
  8. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion _Platform.cs
    Original file line number Diff line number Diff line change
    @@ -98,7 +98,7 @@ interface INetFramework462 : INetFramework461, INetStandard15

    // Windows Universal Platform

    interface IWindowsUniversalPlatform : INetStandard13
    interface IWindowsUniversalPlatform : INetStandard14
    {
    void GPS();
    void Xaml();
  9. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Example1.cs
    Original file line number Diff line number Diff line change
    @@ -62,7 +62,7 @@ public void MultipleTargetsLibrary(INetStandard13 platform)

    /// <summary>
    /// This example shows how future platforms can be added without the need to change libraries that
    /// target the .NET Standard. JSN.NET targets .NET Standard 1.0 and can run on *ANY* platform that implements
    /// target the .NET Standard. JSON.NET targets .NET Standard 1.0 and can run on *ANY* platform that implements
    /// the standard.
    /// </summary>
    class Example3
  10. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Example1.cs
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ namespace Analogy
    /// This example shows that a library that needs access to target .NET Standard 1.3
    /// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
    /// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
    /// </summary>
    /// </summary>INetCoreApp10
    class Example1
    {
    public void Net45Application(INetFramework45 platform)
    @@ -43,7 +43,7 @@ public void Net45Application(INetFramework451 platform)
    MultipleTargetsLibrary(platform);
    }

    public void NetCoreApplication(INetCore10 platform)
    public void NetCoreApplication(INetCoreApp10 platform)
    {
    // On the .NET Core 1.0 application, the INetStandard13 implementation is choson
    MultipleTargetsLibrary(platform);
  11. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion _Platform.cs
    Original file line number Diff line number Diff line change
    @@ -118,7 +118,7 @@ interface IXamarinAndroid : INetStandard15

    // .NET Core

    interface INetCore10 : INetStandard15
    interface INetCoreApp10 : INetStandard15
    {

    }
  12. @davidfowl davidfowl revised this gist Apr 22, 2016. No changes.
  13. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion Example1.cs
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,9 @@ public void NetStandardLibrary13(INetStandard13 platform)

    /// <summary>
    /// This example shows a library targeting multiple frameworks and 2 different applications
    /// using that library.
    /// using that library. MultipleTargetsLibrary needs access to the FileSystem, that API was only available
    /// in .NET Standard 1.3. .NET Standard 1.3 only works with .NET Framework 4.6. Because of this
    /// MultipleTargetsLibrary needs to add support for .NET Framework 4.5 explicitly.
    /// </summary>
    class Example2
    {
    @@ -58,6 +60,11 @@ public void MultipleTargetsLibrary(INetStandard13 platform)
    }
    }

    /// <summary>
    /// This example shows how future platforms can be added without the need to change libraries that
    /// target the .NET Standard. JSN.NET targets .NET Standard 1.0 and can run on *ANY* platform that implements
    /// the standard.
    /// </summary>
    class Example3
    {
    /// <summary>
  14. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 38 additions and 3 deletions.
    41 changes: 38 additions & 3 deletions Example1.cs
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,19 @@
    namespace Analogy
    {
    /// <summary>
    /// In these examples, each method represents a project. Calling a method is like using
    /// that reference
    /// This example shows that a library that needs access to target .NET Standard 1.3
    /// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
    /// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
    /// </summary>
    class Example1
    {
    public void Net45Application(INetFramework45 platform)
    {
    // .NET Framework 4.5 has access to all APIs
    // .NET Framework 4.5 has access to all .NET Framework APIs
    platform.FileSystem();

    platform.Console();


    // This fails because .NET Framework 4.5 does not implement .NET Standard 1.3
    // Argument 1: cannot convert from 'Analogy.INetFramework45' to 'Analogy.INetStandard13'
    @@ -20,10 +23,42 @@ public void Net45Application(INetFramework45 platform)
    public void NetStandardLibrary13(INetStandard13 platform)
    {
    platform.FileSystem();

    platform.Console();
    }
    }


    /// <summary>
    /// This example shows a library targeting multiple frameworks and 2 different applications
    /// using that library.
    /// </summary>
    class Example2
    {
    public void Net45Application(INetFramework451 platform)
    {
    // On the .NET 4.5.1 application, the INetFramework45 implementation is choson
    MultipleTargetsLibrary(platform);
    }

    public void NetCoreApplication(INetCore10 platform)
    {
    // On the .NET Core 1.0 application, the INetStandard13 implementation is choson
    MultipleTargetsLibrary(platform);
    }

    public void MultipleTargetsLibrary(INetFramework45 platform)
    {
    platform.FileSystem();
    }

    public void MultipleTargetsLibrary(INetStandard13 platform)
    {
    platform.FileSystem();
    }
    }

    class Example3
    {
    /// <summary>
    /// This future platform implements .NET Standard 1.3
  15. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions Example1.cs
    Original file line number Diff line number Diff line change
    @@ -6,20 +6,20 @@ namespace Analogy
    /// </summary>
    class Example1
    {
    public void Net45Application(INetFramework45 project)
    public void Net45Application(INetFramework45 platform)
    {
    // .NET Framework 4.5 has access to all APIs
    project.FileSystem();
    platform.FileSystem();


    // This fails because .NET Framework 4.5 does not implement .NET Standard 1.3
    // Argument 1: cannot convert from 'Analogy.INetFramework45' to 'Analogy.INetStandard13'
    NetStandardLibrary13(project);
    }

    public void NetStandardLibrary13(INetStandard13 project)
    public void NetStandardLibrary13(INetStandard13 platform)
    {
    project.FileSystem();
    platform.FileSystem();
    }
    }

    @@ -28,22 +28,22 @@ class Example2
    /// <summary>
    /// This future platform implements .NET Standard 1.3
    /// </summary>
    public void FuturePlatformApplication(ISomeFuturePlatform project)
    public void FuturePlatformApplication(ISomeFuturePlatform platform)
    {
    // You are able to use JSON.NET with the future platform without recompiling JSON.NET
    JsonNet(project);
    JsonNet(platform);
    }

    /// <summary>
    /// This method represents the implementation of JSON.NET. JSON.NET supports .NET Standard 1.0.
    /// </summary>
    public void JsonNet(INetStandard10 project)
    public void JsonNet(INetStandard10 platform)
    {
    project.Linq();
    platform.Linq();

    project.Reflection();
    platform.Reflection();

    project.Collections();
    platform.Collections();
    }
    }
    }
  16. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Example1.cs
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ public void Net45Application(INetFramework45 project)

    // This fails because .NET Framework 4.5 does not implement .NET Standard 1.3
    // Argument 1: cannot convert from 'Analogy.INetFramework45' to 'Analogy.INetStandard13'
    // NetStandardLibrary13(project);
    NetStandardLibrary13(project);
    }

    public void NetStandardLibrary13(INetStandard13 project)
  17. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 25 additions and 1 deletion.
    26 changes: 25 additions & 1 deletion Example1.cs
    Original file line number Diff line number Diff line change
    @@ -14,12 +14,36 @@ public void Net45Application(INetFramework45 project)

    // This fails because .NET Framework 4.5 does not implement .NET Standard 1.3
    // Argument 1: cannot convert from 'Analogy.INetFramework45' to 'Analogy.INetStandard13'
    NetStandardLibrary13(project);
    // NetStandardLibrary13(project);
    }

    public void NetStandardLibrary13(INetStandard13 project)
    {
    project.FileSystem();
    }
    }

    class Example2
    {
    /// <summary>
    /// This future platform implements .NET Standard 1.3
    /// </summary>
    public void FuturePlatformApplication(ISomeFuturePlatform project)
    {
    // You are able to use JSON.NET with the future platform without recompiling JSON.NET
    JsonNet(project);
    }

    /// <summary>
    /// This method represents the implementation of JSON.NET. JSON.NET supports .NET Standard 1.0.
    /// </summary>
    public void JsonNet(INetStandard10 project)
    {
    project.Linq();

    project.Reflection();

    project.Collections();
    }
    }
    }
  18. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 5 additions and 9 deletions.
    14 changes: 5 additions & 9 deletions Example1.cs
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,12 @@
    namespace Analogy
    {
    /// <summary>
    /// In these examples, each method represents a project. Calling a method is like using
    /// that reference
    /// </summary>
    class Example1
    {
    public void Net45(INetFramework45 project)
    public void Net45Application(INetFramework45 project)
    {
    // .NET Framework 4.5 has access to all APIs
    project.FileSystem();
    @@ -13,16 +17,8 @@ public void Net45(INetFramework45 project)
    NetStandardLibrary13(project);
    }

    public void NetStandardLibrary11(INetStandard11 project)
    {
    project.HttpClient();
    }

    public void NetStandardLibrary13(INetStandard13 project)
    {
    // Newer .NET Standard compatible libraries work with older ones
    NetStandardLibrary11(project);

    project.FileSystem();
    }
    }
  19. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 19 additions and 0 deletions.
    19 changes: 19 additions & 0 deletions _Platform.cs
    Original file line number Diff line number Diff line change
    @@ -86,6 +86,16 @@ interface INetFramework46 : INetFramework452, INetStandard13
    // TODO: .NET Framework 4.6 specific APIs
    }

    interface INetFramework461 : INetFramework46, INetStandard14
    {
    // TODO: .NET Framework 4.6.1 specific APIs
    }

    interface INetFramework462 : INetFramework461, INetStandard15
    {
    // TODO: .NET Framework 4.6 specific APIs
    }

    // Windows Universal Platform

    interface IWindowsUniversalPlatform : INetStandard13
    @@ -112,4 +122,13 @@ interface INetCore10 : INetStandard15
    {

    }

    // Future platform

    interface ISomeFuturePlatform : INetStandard13
    {
    // A future platform chooses to implement a specific .NET Standard version.
    // All libraries that target that version are instantly compatible with this new
    // platform
    }
    }
  20. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Example1.cs
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,7 @@ public void Net45(INetFramework45 project)


    // This fails because .NET Framework 4.5 does not implement .NET Standard 1.3
    // Argument 1: cannot convert from 'Analogy.INetFramework45' to 'Analogy.INetStandard13'
    NetStandardLibrary13(project);
    }

  21. @davidfowl davidfowl revised this gist Apr 22, 2016. No changes.
  22. @davidfowl davidfowl renamed this gist Apr 22, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  23. @davidfowl davidfowl revised this gist Apr 22, 2016. 2 changed files with 28 additions and 0 deletions.
    28 changes: 28 additions & 0 deletions Example1.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    namespace Analogy
    {
    class Example1
    {
    public void Net45(INetFramework45 project)
    {
    // .NET Framework 4.5 has access to all APIs
    project.FileSystem();


    // This fails because .NET Framework 4.5 does not implement .NET Standard 1.3
    NetStandardLibrary13(project);
    }

    public void NetStandardLibrary11(INetStandard11 project)
    {
    project.HttpClient();
    }

    public void NetStandardLibrary13(INetStandard13 project)
    {
    // Newer .NET Standard compatible libraries work with older ones
    NetStandardLibrary11(project);

    project.FileSystem();
    }
    }
    }
    File renamed without changes.
  24. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 19 additions and 3 deletions.
    22 changes: 19 additions & 3 deletions Foo.cs
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,10 @@

    namespace Analogy
    {
    // Each interface represents a target framework and methods represents groups of APIs available on that target framework.
    // The goal is to show the relationship between .NET Standard API surface and other .NET platforms


    // .NET Standard

    interface INetStandard10
    @@ -69,17 +73,17 @@ interface INetFramework45 : INetStandard11

    interface INetFramework451 : INetFramework45, INetStandard12
    {

    // TODO: .NET Framework 4.5.1 specific APIs
    }

    interface INetFramework452 : INetFramework451, INetStandard12
    {
    // Not Many APIs were added in .NET 4.5
    // TODO: .NET Framework 4.5.2 specific APIs
    }

    interface INetFramework46 : INetFramework452, INetStandard13
    {

    // TODO: .NET Framework 4.6 specific APIs
    }

    // Windows Universal Platform
    @@ -90,6 +94,18 @@ interface IWindowsUniversalPlatform : INetStandard13
    void Xaml();
    }

    // Xamarin

    interface IXamarinIOS : INetStandard15
    {
    void AppleAPIs();
    }

    interface IXamarinAndroid : INetStandard15
    {
    void GoogleAPIs();
    }

    // .NET Core

    interface INetCore10 : INetStandard15
  25. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions Foo.cs
    Original file line number Diff line number Diff line change
    @@ -40,6 +40,16 @@ interface INetStandard13 : INetStandard12
    void AsyncLocal();
    }

    interface INetStandard14 : INetStandard13
    {
    void IsolatedStorage();
    }

    interface INetStandard15 : INetStandard14
    {
    void AssemblyLoadContext();
    }

    // .NET Framework

    interface INetFramework45 : INetStandard11
    @@ -79,4 +89,11 @@ interface IWindowsUniversalPlatform : INetStandard13
    void GPS();
    void Xaml();
    }

    // .NET Core

    interface INetCore10 : INetStandard15
    {

    }
    }
  26. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 0 additions and 73 deletions.
    73 changes: 0 additions & 73 deletions Foo.cs
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,5 @@
    using System;

    namespace Analogy
    {using System;

    namespace Analogy
    {
    // .NET Standard
    @@ -82,74 +79,4 @@ interface IWindowsUniversalPlatform : INetStandard13
    void GPS();
    void Xaml();
    }
    }

    // .NET Standard

    interface INetStandard10
    {
    void Primitives();
    void Reflection();
    void Tasks();
    void Xml();
    void Collections();
    void Linq();
    }

    interface INetStandard11 : INetStandard10
    {
    void ConcurrentCollections();
    void LinqParallel();
    void Compression();
    void HttpClient();
    }

    interface INetStandard12 : INetStandard11
    {
    void ThreadingTimer();
    }

    interface INetStandard13 : INetStandard12
    {
    void FileSystem();
    void Console();
    void ThreadPool();
    void Crypto();
    void WebSockets();
    void Process();
    void Sockets();
    }

    // .NET Framework

    interface INetFramework45 : INetStandard11
    {
    void FileSystem();
    void Console();
    void ThreadPool();
    void Crypto();
    void WebSockets();
    void Process();
    void Drawing();
    void SystemWeb();
    void WPF();
    void WindowsForms();
    void WCF();
    }

    interface INetFramework451 : INetFramework45, INetStandard12
    {

    }

    interface INetFramework452 : INetFramework451, INetStandard12
    {
    // Not Many APIs were added in .NET 4.5
    }

    interface INetFramework46 : INetFramework452, INetStandard13
    {
    void AsyncLocal();
    }

    }
  27. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 82 additions and 0 deletions.
    82 changes: 82 additions & 0 deletions Foo.cs
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    using System;

    namespace Analogy
    {using System;

    namespace Analogy
    {
    // .NET Standard
    @@ -27,6 +30,85 @@ interface INetStandard12 : INetStandard11
    void ThreadingTimer();
    }

    interface INetStandard13 : INetStandard12
    {
    void FileSystem();
    void Console();
    void ThreadPool();
    void Crypto();
    void WebSockets();
    void Process();
    void Sockets();

    void AsyncLocal();
    }

    // .NET Framework

    interface INetFramework45 : INetStandard11
    {
    void FileSystem();
    void Console();
    void ThreadPool();
    void Crypto();
    void WebSockets();
    void Process();
    void Drawing();
    void SystemWeb();
    void WPF();
    void WindowsForms();
    void WCF();
    }

    interface INetFramework451 : INetFramework45, INetStandard12
    {

    }

    interface INetFramework452 : INetFramework451, INetStandard12
    {
    // Not Many APIs were added in .NET 4.5
    }

    interface INetFramework46 : INetFramework452, INetStandard13
    {

    }

    // Windows Universal Platform

    interface IWindowsUniversalPlatform : INetStandard13
    {
    void GPS();
    void Xaml();
    }
    }

    // .NET Standard

    interface INetStandard10
    {
    void Primitives();
    void Reflection();
    void Tasks();
    void Xml();
    void Collections();
    void Linq();
    }

    interface INetStandard11 : INetStandard10
    {
    void ConcurrentCollections();
    void LinqParallel();
    void Compression();
    void HttpClient();
    }

    interface INetStandard12 : INetStandard11
    {
    void ThreadingTimer();
    }

    interface INetStandard13 : INetStandard12
    {
    void FileSystem();
  28. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions Foo.cs
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,7 @@ interface INetStandard11 : INetStandard10
    void ConcurrentCollections();
    void LinqParallel();
    void Compression();
    void HttpClient();
    }

    interface INetStandard12 : INetStandard11
    @@ -34,6 +35,7 @@ interface INetStandard13 : INetStandard12
    void Crypto();
    void WebSockets();
    void Process();
    void Sockets();
    }

    // .NET Framework
    @@ -47,13 +49,9 @@ interface INetFramework45 : INetStandard11
    void WebSockets();
    void Process();
    void Drawing();

    void SystemWeb();

    void WPF();

    void WindowsForms();

    void WCF();
    }

  29. @davidfowl davidfowl revised this gist Apr 22, 2016. 1 changed file with 14 additions and 11 deletions.
    25 changes: 14 additions & 11 deletions Foo.cs
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    using System;

    namespace Analogy
    {
    // .NET Standard

    interface INetStandard10
    {
    void Primitives();
    @@ -43,16 +46,15 @@ interface INetFramework45 : INetStandard11
    void Crypto();
    void WebSockets();
    void Process();
    void Drawing();

    void SystemWeb();

    void WPF();

    void WindowsForms();

    new void Primitives();
    new void Reflection();
    new void Tasks();
    new void Xml();
    new void Collections();
    new void Linq();
    new void ConcurrentCollections();
    new void LinqParallel();
    new void Compression();
    void WCF();
    }

    interface INetFramework451 : INetFramework45, INetStandard12
    @@ -62,11 +64,12 @@ interface INetFramework451 : INetFramework45, INetStandard12

    interface INetFramework452 : INetFramework451, INetStandard12
    {

    // Not Many APIs were added in .NET 4.5
    }

    interface INetFramework46 : INetFramework452, INetStandard13
    {

    void AsyncLocal();
    }

    }
  30. @davidfowl davidfowl created this gist Apr 22, 2016.
    72 changes: 72 additions & 0 deletions Foo.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,72 @@

    namespace Analogy
    {
    interface INetStandard10
    {
    void Primitives();
    void Reflection();
    void Tasks();
    void Xml();
    void Collections();
    void Linq();
    }

    interface INetStandard11 : INetStandard10
    {
    void ConcurrentCollections();
    void LinqParallel();
    void Compression();
    }

    interface INetStandard12 : INetStandard11
    {
    void ThreadingTimer();
    }

    interface INetStandard13 : INetStandard12
    {
    void FileSystem();
    void Console();
    void ThreadPool();
    void Crypto();
    void WebSockets();
    void Process();
    }

    // .NET Framework

    interface INetFramework45 : INetStandard11
    {
    void FileSystem();
    void Console();
    void ThreadPool();
    void Crypto();
    void WebSockets();
    void Process();

    new void Primitives();
    new void Reflection();
    new void Tasks();
    new void Xml();
    new void Collections();
    new void Linq();
    new void ConcurrentCollections();
    new void LinqParallel();
    new void Compression();
    }

    interface INetFramework451 : INetFramework45, INetStandard12
    {

    }

    interface INetFramework452 : INetFramework451, INetStandard12
    {

    }

    interface INetFramework46 : INetFramework452, INetStandard13
    {

    }
    }