LanguageFactoryFindAll Method |
Find all languages.
Namespace:
AskiaPortalCmn
Assembly:
AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax public static IEnumerable<ILanguage> FindAll(
IContext context,
QueryAllFilter filter = QueryAllFilter.NotDeleted
)
Public Shared Function FindAll (
context As IContext,
Optional filter As QueryAllFilter = QueryAllFilter.NotDeleted
) As IEnumerable(Of ILanguage)
public:
static IEnumerable<ILanguage^>^ FindAll(
IContext^ context,
QueryAllFilter filter = QueryAllFilter::NotDeleted
)
Parameters
- context
- Type: AskiaPortalCmnIContext
Context of execution. - filter (Optional)
- Type: AskiaPortalCmn.CommonQueryAllFilter
Filter to apply on query.
Return Value
Type:
IEnumerableILanguageReturn an object to iterate through the list of languages.
Examples
Find all languages.
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D"));
var contextValidation = context.Validate();
if (!contextValidation.Success)
{
throw contextValidation.Exception;
}
var languages = LanguageFactory.FindAll(context);
foreach(ILanguage language in languages)
{
Console.WriteLine($"Language Key={language.Key}: {language.Name}");
}
See Also