Click or drag to resize

ModuleFactoryFindAllByGuids Method

Find all modules using a list of GUIDs.

Namespace:  AskiaPortalCmn
Assembly:  AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax
public static IEnumerable<IModule> FindAllByGuids(
	IContext context,
	IEnumerable<Guid> guids
)

Parameters

context
Type: AskiaPortalCmnIContext
Context of execution
guids
Type: System.Collections.GenericIEnumerableGuid
GUIDs of the modules to find

Return Value

Type: IEnumerableIModule
Return an object to iterate through the list of modules
Examples

Find the modules using GUIDs

var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D"));   
var contextValidation = context.Validate();
if (!contextValidation.Success)
{
    throw contextValidation.Exception;
}
var guids = new List<Guid>
     {
        Guid.Parse("9821219b-0768-41cc-81d8-cf3b1ade9317"),
        Guid.Parse("6d75653c-fe59-47ba-801c-f770df1acba6"),
        Guid.Parse("d7cf5c25-d34a-4374-bc1f-04f77b28a1ee")
     };
var modules = ModuleFactory.FindAllByGuids(context, guids);
foreach(IModule module in modules)
{
    Console.WriteLine($"Module Guid={module.Guid}: {module.Name}");
}
See Also