GroupFactoryFindAllReachableRecursively Method (IContext, IUser) |
Namespace: AskiaPortalCmn
public static IEnumerable<IGroup> FindAllReachableRecursively( IContext context, IUser user )
Recursively find all groups reachable by the specified user.
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D")); var contextValidation = context.Validate(); if (!contextValidation.Success) { throw contextValidation.Exception; } var groups = GroupFactory.FindAllReachableRecursively(context, context.User); foreach(IGroup group in groups) { Console.WriteLine($"Group Id={group.Id}: {group.Name}"); }