Click or drag to resize

ModuleFactoryFindById Method

Find a module using his identifier.

Namespace:  AskiaFieldCom
Assembly:  AskiaFieldCom (in AskiaFieldCom.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static IResult<IModule> FindById(
	IContext context,
	int id
)

Parameters

context
Type: AskiaFieldComIContext
Context of execution.
id
Type: SystemInt32
Identifier 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 identifier.

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