Load once with
NSObject is a nice place to put some code that executes only once, e.g. register some dependency injections.
There is no such concept in F#, but can be archived with the
module Service = let private _getDef = lazy ( DicService.registerHttpMessageHandler (new NSUrlSessionHandler ()) (fun word -> DicService.getDefinition word platformSpecFunc)) let getDef = _getDef.Force()
_getDef will execute at the first time when
getDef being called, and only once.