Created
January 25, 2014 13:14
-
-
Save eiriktsarpalis/8616199 to your computer and use it in GitHub Desktop.
FsPickler without strong names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open FsPickler | |
let settings = new CustomPicklerRegistry("noStrongNames") | |
let nostrongnames = | |
{ | |
new ITypeNameConverter with | |
member __.ToDeserializedType tI = tI | |
member __.OfSerializedType (tI : TypeInfo) = | |
{ | |
Name = tI.Name | |
AssemblyName = tI.AssemblyName | |
Version = null | |
Culture = null | |
PublicKeyToken = null | |
} | |
} | |
settings.SetTypeNameConverter nostrongnames | |
let fsp = new FsPickler(settings) | |
// serialize away |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment