Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let withFakeContextSyncRoot = new obj()
- let withFakeContext name f =
- lock withFakeContextSyncRoot (fun () ->
- use execContext = Fake.Core.Context.FakeExecutionContext.Create false (sprintf "text.fsx - %s" name) []
- Fake.Core.Context.setExecutionContext (Fake.Core.Context.RuntimeContext.Fake execContext)
- try f ()
- finally
- Fake.Core.Context.removeExecutionContext()
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement