C# Class SIPSorcery.Sys.AppState

Inheritance: IConfigurationSectionHandler
Afficher le fichier Open project: sipsorcery/sipsorcery

Méthodes publiques

Свойство Type Description
CurrentDirectory string
NewLine string
logger log4net.ILog

Méthodes publiques

Méthode Description
ConfigureConsoleLogger ( ) : void

Configures the logging object to use a console logger. This would normally be used as a fallback when either the application does not have any logging configuration or there is an error in it.

Create ( object parent, object context, XmlNode configSection ) : object

Handler for processing the App.Config file and retrieving a custom XML node.

GetConfigNodeValue ( XmlNode configNode, string nodeName ) : string
GetConfigSetting ( string key ) : string

Wrapper around the object holding the application configuration settings extracted from the App.Config file.

GetConfigSettingAsBool ( string key ) : bool
GetLogger ( string logName ) : log4net.ILog
GetSection ( string sectionName ) : object
LoadCertificate ( StoreLocation storeLocation, string certificateSubject, bool checkValidity ) : X509Certificate2

Attempts to load an X509 certificate from a Windows OS certificate store.

ToAbsoluteDirectoryPath ( string directoryPath ) : string

Checks whether a directory path represents a relative or absolute path and if it's relative converts it to an absolute one by prefixing it with the application's base directory.

ToAbsoluteFilePath ( string filePath ) : string

Checks whether a file path represents a relative or absolute path and if it's relative converts it to an absolute one by prefixing it with the application's base directory.

Private Methods

Méthode Description
AppState ( ) : System
GetEncryptedSettingsCertificate ( ) : X509Certificate2

Method Details

ConfigureConsoleLogger() public static méthode

Configures the logging object to use a console logger. This would normally be used as a fallback when either the application does not have any logging configuration or there is an error in it.
public static ConfigureConsoleLogger ( ) : void
Résultat void

Create() public méthode

Handler for processing the App.Config file and retrieving a custom XML node.
public Create ( object parent, object context, XmlNode configSection ) : object
parent object
context object
configSection System.Xml.XmlNode
Résultat object

GetConfigNodeValue() public static méthode

public static GetConfigNodeValue ( XmlNode configNode, string nodeName ) : string
configNode System.Xml.XmlNode
nodeName string
Résultat string

GetConfigSetting() public static méthode

Wrapper around the object holding the application configuration settings extracted from the App.Config file.
public static GetConfigSetting ( string key ) : string
key string The name of the configuration setting wanted.
Résultat string

GetConfigSettingAsBool() public static méthode

public static GetConfigSettingAsBool ( string key ) : bool
key string
Résultat bool

GetLogger() public static méthode

public static GetLogger ( string logName ) : log4net.ILog
logName string
Résultat log4net.ILog

GetSection() public static méthode

public static GetSection ( string sectionName ) : object
sectionName string
Résultat object

LoadCertificate() public static méthode

Attempts to load an X509 certificate from a Windows OS certificate store.
public static LoadCertificate ( StoreLocation storeLocation, string certificateSubject, bool checkValidity ) : X509Certificate2
storeLocation StoreLocation The certificate store to load from, can be CurrentUser or LocalMachine.
certificateSubject string The subject name of the certificate to attempt to load.
checkValidity bool Checks if the certificate is current and has a verifiable certificate issuer list. Should be /// set to false for self issued certificates.
Résultat System.Security.Cryptography.X509Certificates.X509Certificate2

ToAbsoluteDirectoryPath() public static méthode

Checks whether a directory path represents a relative or absolute path and if it's relative converts it to an absolute one by prefixing it with the application's base directory.
public static ToAbsoluteDirectoryPath ( string directoryPath ) : string
directoryPath string The directory path to check.
Résultat string

ToAbsoluteFilePath() public static méthode

Checks whether a file path represents a relative or absolute path and if it's relative converts it to an absolute one by prefixing it with the application's base directory.
public static ToAbsoluteFilePath ( string filePath ) : string
filePath string The file path to check.
Résultat string

Property Details

CurrentDirectory public_oe static_oe property

public static string CurrentDirectory
Résultat string

NewLine public_oe static_oe property

public static string NewLine
Résultat string

logger public_oe static_oe property

public static ILog,log4net logger
Résultat log4net.ILog