ApplicationFactoryFindAllForUser Method |
Find all applications available for the specified user.
Namespace:
AskiaPortalCmn
Assembly:
AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax public static IEnumerable<IApplication> FindAllForUser(
IContext context,
IUser user,
QueryAllFilter filter = QueryAllFilter.NotDeleted
)
Public Shared Function FindAllForUser (
context As IContext,
user As IUser,
Optional filter As QueryAllFilter = QueryAllFilter.NotDeleted
) As IEnumerable(Of IApplication)
public:
static IEnumerable<IApplication^>^ FindAllForUser(
IContext^ context,
IUser^ user,
QueryAllFilter filter = QueryAllFilter::NotDeleted
)
Parameters
- context
- Type: AskiaPortalCmnIContext
Context of execution. - user
- Type: AskiaPortalCmnIUser
User for who to find available applications. - filter (Optional)
- Type: AskiaPortalCmn.CommonQueryAllFilter
Filter to apply on query.
Return Value
Type:
IEnumerableIApplicationReturn an object to iterate through the list of applications.
Examples
Find all applications available for 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 apps = ApplicationFactory.FindAllForUser(context, context.User);
foreach(IApplication app in apps)
{
Console.WriteLine($"Application Id={app.Id}: {app.Name}");
}
See Also