F# – converting a C# dictionary to a Map

Found a useful little snippet that converts a C# dictionary to F#’s map which uses the built-in KeyValue active pattern: