GenEnvironmentAttribute Type
Generates a create function for an interface that only inherits provider interfaces,
implementing every provider from an anonymous record of effects, and run and runOrFail functions
that run an effect in the created environment.
Example
[<GenEnvironment>]
type IAppEnvironment =
inherit IButtonPusherProvider
inherit IGuidGenProvider
// using the generated module
let env = AppEnvironment.create {| ButtonPusher = pusher; GuidGenerator = GuidGenerator.defaultGen () |}
let! result = AppEnvironment.run {| ButtonPusher = pusher; GuidGenerator = GuidGenerator.defaultGen () |} (work ())
type IAppEnvironment =
inherit obj
inherit obj
val env: obj
val result: obj
Constructors
| Constructor |
Description
|
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.Inline
Returns: bool
|
Only needed with Myriad 1.0: set when the file uses MyriadInlineGeneration, so the code is generated without namespace or opens, to be appended to the end of the file. Myriad 1.1 and later say whether a file is inline themselves, which then takes precedence.
|
Orsak