Class AppConfiguration
- Namespace
- PolarStudio
- Assembly
- PolarStudio.dll
The AppConfiguration contains the whole configuration of this server-application.
public class AppConfiguration
- Inheritance
-
AppConfiguration
- Inherited Members
- Extension Methods
Constructors
AppConfiguration()
The initializer, required to work with JSON deserializer. Also used to create a new AppConfiguration to run a child-application in a project.
public AppConfiguration()
Fields
CallBackObject
Is used by Polar Studio to pass a Call Back object to the new initialized BudaEngine.
[JsonIgnore]
public object CallBackObject
Field Value
Properties
AllowedTimerProcessCount
Sets the allowed number of Timers for this project. Can be set only once.
public int AllowedTimerProcessCount { get; set; }
Property Value
ApplicationSettings
A list of ApplicationSetting for each application in the project.
public List<AppConfiguration_ApplicationSettings> ApplicationSettings { get; set; }
Property Value
BlobPathSecured
public string BlobPathSecured { get; set; }
Property Value
BlobPathSecured_Backup
A secundary location to store a backup for secured Blobs
public string BlobPathSecured_Backup { get; set; }
Property Value
BlobPathStorageLocation
The blob-path that is actually part of the webroot, used to store unsecured blobs
public string BlobPathStorageLocation { get; set; }
Property Value
BlobPathStorageLocation_Backup
A secundary location to store a backup for unsecured Blobs
public string BlobPathStorageLocation_Backup { get; set; }
Property Value
CertificatePath
The full path and filename to the certificate to use for this application. If left empty, a default certificate will be searched for
public string CertificatePath { get; set; }
Property Value
ConfigurationFilePath
If the AppConfiguration is read from a JSON file, this property contains the path to this file in the file system.
[JsonIgnore]
public string ConfigurationFilePath { get; }
Property Value
CustomProperties
A list of custom properties that can be used to configure a specific project. The custom properties are name/value pairs of string/string.
public List<AppConfiguration_CustomProperty> CustomProperties { get; set; }
Property Value
DefaultWebService
The Default WebService to use for either the LoggingWebService or the UserValidationWebService if these are not specified.
public AppConfiguration_WebService DefaultWebService { get; set; }
Property Value
EnableDevelopmentModeForDirectStartedProject
When a project is started without a call-back object, it is likely NOT to allow DevelopmentMode. This setting can still allow development mode in that situation (when also configured in the project)
public bool EnableDevelopmentModeForDirectStartedProject { get; set; }
Property Value
HostNameAndVirtualDirectory
The known HostName and the Virtual Directory, separated by a semicolon
public string HostNameAndVirtualDirectory { get; set; }
Property Value
LoggingWebService
The WebService to use for Logging errors and log-ins. If not specified, the DefaultWebService is used.
public AppConfiguration_WebService LoggingWebService { get; set; }
Property Value
MaxConcurrentUsers
This property sets/gets the limit for the concurrent users. If set to 0 (default) it is unlimited and therefor limited by the Certificate. Can be set to a specific value to overrule (limit) the number of allowed concurrent users.
public int MaxConcurrentUsers { get; set; }
Property Value
Name
The name to identify the current configuration
public string Name { get; set; }
Property Value
ProjectConnection
Returns the connection to the database used to store the repository of the project for this application.
public AppConfiguration_Connection ProjectConnection { get; set; }
Property Value
ProjectFolder
The folder in the file system used to store project-specific data or temporary files.
public string ProjectFolder { get; set; }
Property Value
ProjectName
A project name, to show in the caption-bar of PolarStudio, so the developer knows which project he/she is editing
public string ProjectName { get; set; }
Property Value
RemoteManagementKey
A Key to use for remote management. This is used by Polar Studio internally
public string RemoteManagementKey { get; set; }
Property Value
SmartHost
The SmartHost used to send out SMTP email messages.
public string SmartHost { get; set; }
Property Value
UserValidationWebService
The WebService to use for Blue-Polar based user validation. If not specified, the DefaultWebService is used.
public AppConfiguration_WebService UserValidationWebService { get; set; }
Property Value
WebRoot
The path in the file system where the WebRoot is located.
public string WebRoot { get; set; }
Property Value
WindowsPassword
The password to use for the user specified in WindowsUserName.
public string WindowsPassword { get; set; }
Property Value
WindowsUserName
A UserName specified in the Windows operating to use for this application.
public string WindowsUserName { get; set; }
Property Value
Methods
GetAppConfiguration(string)
To get an AppConfiguration form a JSON file on in the file system.
public static AppConfiguration GetAppConfiguration(string pConfigurationFilePath = "")
Parameters
pConfigurationFilePath
stringThe full path to the configuration file.
Returns
- AppConfiguration
The initialized AppConfiguration.
GetApplicationSettings(string, bool)
To get the AppConfiguration_ApplicationSettings object for the given PID. May also return the default settings (PID=="*") if no settings were found for the given PID.
public AppConfiguration_ApplicationSettings GetApplicationSettings(string PID, bool pIngoreDefaultApplicationSettings = false)
Parameters
PID
stringThe PID to search for
pIngoreDefaultApplicationSettings
boolA boolean to prevent returning the default settings if no specific settings are found.
Returns
- AppConfiguration_ApplicationSettings
The settings for the application
GetConfiguration()
The full JSON for this AppConfiguration
public string GetConfiguration()
Returns
- string
A string representing the full JSON for this AppConfiguration.
GetCustomProperty(string, string)
To get the value of a specific custom property.
public string GetCustomProperty(string pName, string pDefaultValue = "")
Parameters
pName
stringThe name of the custom property
pDefaultValue
stringThe value to return if the custom property was not found.
Returns
- string
The value of the custom property or - if the custom property was not found - the value specified in parameter pDefaultValue
GetLoggingWebService()
Returns either the LoggingWebService or - if that was not specified - the DefaultWebService
public AppConfiguration_WebService GetLoggingWebService()
Returns
GetUserValidationWebService()
Returns either the UserValidationWebService or - if that was not specified - the DefaultWebService
public AppConfiguration_WebService GetUserValidationWebService()
Returns
HasWriteAccess()
Returns a boolean value indicating that the current process is allowed to save changes to the current configuration in the file system.
public bool HasWriteAccess()
Returns
NewApplicationSettings(string)
A helper to create a new AppConfiguration_ApplicationSettings object for the given PID
public AppConfiguration_ApplicationSettings NewApplicationSettings(string PID)
Parameters
PID
stringThe PID for the application this AppConfiguration_ApplicationSettings object is create for
Returns
- AppConfiguration_ApplicationSettings
The new AppConfiguration_ApplicationSettings object
NewConnection()
To create a new Connection
public AppConfiguration_Connection NewConnection()
Returns
- AppConfiguration_Connection
A new AppConfiguration_Connection object
NewConnection(AppConfiguration_Connection)
To create a new connection based on a given connection
public AppConfiguration_Connection NewConnection(AppConfiguration_Connection pSourceConnection)
Parameters
pSourceConnection
AppConfiguration_ConnectionThe connection to use as definition.
Returns
NewConnection(string)
To create a new Connection for a full ConnectionString
public AppConfiguration_Connection NewConnection(string pCustomConnectionString)
Parameters
pCustomConnectionString
stringThe full connectionstring
Returns
- AppConfiguration_Connection
A new connection
NewConnection(string, string, string, string)
To create a new Connection for the given server/database/username/password
public AppConfiguration_Connection NewConnection(string pServer, string pDatabase, string pUserName = "", string pPassword = "")
Parameters
pServer
stringThe server to connect to
pDatabase
stringThe database to connect to
pUserName
stringThe username to use. Leave empty for integrated authentication.
pPassword
stringThe password to use. Leave empty for integrated authentication.
Returns
NewWebService(AppConfiguration_WebService)
To create a WebService definition as a copy of a given WebService
public AppConfiguration_WebService NewWebService(AppConfiguration_WebService pSourceWebService)
Parameters
pSourceWebService
AppConfiguration_WebServiceThe WebService to base the new webservice on
Returns
NewWebService(string, string, string, string)
To create a WebService definition for the given Address, CustomerCodeName, ApplicationCodeName and EncryptionKey
public AppConfiguration_WebService NewWebService(string pAddress = "", string pCustomerCodeName = "", string pApplicationCodeName = "", string pEncryptionKey = "")
Parameters
pAddress
stringThe HTTP address to connect to
pCustomerCodeName
stringThe CustomerCodeName to pass
pApplicationCodeName
stringThe ApplicationCodeName to pass
pEncryptionKey
stringThe symatric key that is used to encrypt data
Returns
- AppConfiguration_WebService
A new WebService
SetApplicationSettings(AppConfiguration_ApplicationSettings)
To update or add specific application settings.
public void SetApplicationSettings(AppConfiguration_ApplicationSettings pApplicationSettings)
Parameters
pApplicationSettings
AppConfiguration_ApplicationSettingsThe new or updated application settings
Write()
To write changes in the current configuration to the file system.
public void Write()
Write(ref string)
To write changes in the current configuration to the file system.
public void Write(ref string pErrorMessage)
Parameters
pErrorMessage
stringA by-ref parameter that will be filled with an error message is applicable.