| ModuleFactoryCreate Method |
Creates a fresh new instance of module.
Namespace:
AskiaFieldCom
Assembly:
AskiaFieldCom (in AskiaFieldCom.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static IResult<IModule> Create(
IContext context
)
public:
static IResult<IModule^>^ Create(
IContext^ context
)
Parameters
- context
- Type: AskiaFieldComIContext
Specified the context of execution.
Return Value
Type:
IResultIModule
Returns a fresh new instance of module.
Remarks
This instance only exist in memory
until you explicitly call the
Save method.
Examples Create a new module.
var module = ModuleFactory.Create(context);
module.Name = "MyModuleName";
var result = module.Save();
if (!result.Success) throw result.Exception;
Console.WriteLine($"Module created with the id {module.Id}");
See Also