Skip to content

Instantly share code, notes, and snippets.

@adamchester
Created April 24, 2016 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamchester/46ac486b4e3d7a9ecf359792163123b6 to your computer and use it in GitHub Desktop.
Save adamchester/46ac486b4e3d7a9ecf359792163123b6 to your computer and use it in GitHub Desktop.
How .NET Standard relates to .NET Platforms (in F# functions)
type ASetOfApis = unit->unit
module ApiSets =
type Primatives = ASetOfApis
type Reflection = ASetOfApis
type Tasks = ASetOfApis
type Collections = ASetOfApis
type Linq = ASetOfApis
type ConcurrentCollections = ASetOfApis
type InteropServices = ASetOfApis
type ThreadingTimer = ASetOfApis
type FileSystem = ASetOfApis
type Console = ASetOfApis
type ThreadPool = ASetOfApis
type Process = ASetOfApis
type Sockets = ASetOfApis
type AsyncLocal = ASetOfApis
type IsolatedStorage = ASetOfApis
type AssemblyLoadContext = ASetOfApis
type Crypto = ASetOfApis
type WebSockets = ASetOfApis
type AppDomain = ASetOfApis
type Xml = ASetOfApis
type Drawing = ASetOfApis
type SystemWeb = ASetOfApis
type Wpf = ASetOfApis
type WindowsForms = ASetOfApis
type Wcf = ASetOfApis
type NetFramework451Specific = ASetOfApis
type NetFramework452Specific = ASetOfApis
type NetFramework46Specific = ASetOfApis
type NetFramework461Specific = ASetOfApis
type NetFramework462Specific = ASetOfApis
type MonoSpecificApis = ASetOfApis
type Gps = ASetOfApis
type Xaml = ASetOfApis
type AppleApis = ASetOfApis
type GoogleApis = ASetOfApis
module Platforms =
open ApiSets
type NetStandard10 = Primatives -> Reflection -> Tasks -> Collections -> Linq
type NetStandard11 = NetStandard10 -> ConcurrentCollections -> InteropServices
type NetStandard12 = NetStandard11 -> ThreadingTimer
type NetStandard13 = NetStandard12 -> FileSystem -> Console -> ThreadPool -> Process -> Sockets -> AsyncLocal
type NetStandard14 = NetStandard13 -> IsolatedStorage
type NetStandard15 = NetStandard14 -> AssemblyLoadContext
type NetFramework45 = NetStandard11 -> FileSystem -> Console -> ThreadPool -> Crypto
-> WebSockets -> Process -> Sockets -> AppDomain -> Xml
-> Drawing -> SystemWeb -> Wpf -> WindowsForms -> Wcf
type NetFramework451 = NetFramework45 -> NetStandard12 -> NetFramework451Specific
type NetFramework452 = NetFramework451 -> NetFramework452Specific
type NetFramework46 = NetFramework452 -> NetStandard13 -> NetFramework46Specific
type NetFramework461 = NetFramework46 -> NetStandard14 -> NetFramework461Specific
type NetFramework462 = NetFramework461 -> NetStandard15 -> NetFramework462Specific
type Mono43 = NetFramework46 -> MonoSpecificApis
type WindowsUniversal = NetStandard14 -> Gps -> Xaml
type XamarinIos = NetStandard15 -> AppleApis
type XamarinAndroid = NetStandard15 -> GoogleApis
type NetCoreApp10 = NetStandard15
type SomeFuturePlatform = NetStandard13
module Samples =
open ApiSets
open Platforms
module ExampleLibary1 =
let runOnNet45 : NetFramework45 =
fun netStandard11 fs console threadPool
crypto webSockets procs sockets appDomain
xml drawing systemWeb wpf winForms wcf ->
fs()
console()
let libraryUsingNetStandard13 : NetStandard13 =
fun netStandard12 fs console threadPool proc sockets asyncLocal ->
fs()
console()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment