YetaWF.Core.ConsoleStartup.StartupConsole.StartByIdentity Method
Called to initialize a console application so it can use all of YetaWF's services, including data providers, caching, etc.
Class: YetaWF.Core.ConsoleStartup.StartupConsole
Namespace: YetaWF.Core.ConsoleStartup
Assembly: YetaWF.Core.ConsoleStartup
Syntax
public static void StartByIdentity(
string baseDirectory,
int siteIdentity );
Parameters
baseDirectory
The base folder where the executable and all assemblies for the console application are located.
siteIdentity
The domain's site identity used to access data. This must be an existing domain with a YetaWF site and AppSettings.json must contain data provider information.
Remarks
The Start method makes all settings from AppSettings.json available.
A LanguageSettings.json file must be present defining all languages used by the specified site siteIdentity (a copy of the LanguageSettings.json file used for the website).
The console application must have references to the YetaWF.Core and YetaWF.Caching. The YetaWF.SiteProperties package is not required.
Using this method to start, limited services can be used. Any services that require a complete SiteDefinition (derived from the site's domain name) will fail.
Additional references must be added for services used by the console application.
Because all YetaWF services are available, all data providers and config settings can be accessed (and modified).
Many data providers use site specific data. The data for the specified site siteIdentity is used.
See Also YetaWF.Core.ConsoleStartup.StartupConsole ClassYetaWF.Core.ConsoleStartupYetaWF.Core