AuditSetter

AuditSetter carries initialization settings audit.

The initialization is not necessarily performed by this class, it just contains the most successful initialization with default values.

What happens when you call AuditSetter.InitAuditService(IDataService dataService):

shall be Deducted the value from the configuration file:

#* “AppNameForAudit” (the name of the settings in the configuration file for the application name to audit). #* “AuditEnabled” (the name of the settings in the configuration file to determine whether the audit in the Appendix). #* “IsAuditDatabaseLocal” (the name of the settings in the configuration file to determine whether the auditing database is local to the application). #* “AuditConnectionStringName” (the name of the settings in the configuration file for the name of the connection string to the database audit). #* “AuditWinServiceUrl” (the name of the settings in the config for the address win-service audit). #* “WriteSessions” (the name of the settings in the config to determine whether to write the session user). #* “DefaultWriteMode” (the name of the settings in the config for recording audit data by default).

If the values in the configuration file is invalid or not specified, the tabulated values are the following:

#* “AppNameForAudit” = "AuditAppName_" new Random().Next(65536). #* “AuditEnabled” = false. #* “IsAuditDatabaseLocal” = true. #* “AuditConnectionStringName” = "AuditConnString_" new Random().Next(65536). #* “AuditWinServiceUrl” = string.Empty. #* “WriteSessions” = false. #* “DefaultWriteMode” = tWriteMode.Synchronous.

Creates an instance of the class AuditAppSetting, which records the obtained settings.

Creates an instance of the class AuditDSSetting, which receives obtained by AuditSetter.InitAuditService service data and it formed the view name “<AppNameForAudit>_<auditconnectionstringname>”.

After this initialization occurs AuditService.

AuditService.InitAuditService(auditAppSetting, new ICSSoft.STORMNET.Business.Audit.Audit());