Click or drag to resize

ModuleFactoryFindByName Method

Find a module using his name.

Namespace:  AskiaFieldCom
Assembly:  AskiaFieldCom (in AskiaFieldCom.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static IResult<IModule> FindByName(
	IContext context,
	string name
)

Parameters

context
Type: AskiaFieldComIContext
Context of execution.
name
Type: SystemString
Name of the module to find.

Return Value

Type: IResultIModule
Returns the instance of module or a fail result.
Remarks
Mostly return the ItemNotFoundException in case of failure.
Examples

Find an module using his name.

var result = ModuleFactory.FindByName(context, "MyModule");
if (!result.Success) throw result.Exception;
var module = result.Value;
Console.WriteLine($"Module {module.Id} is found.");
See Also