C# Class CmisSync.Lib.Config

Configuration of a CmisSync synchronized folder. It can be found in the XML configuration file.
Mostrar archivo Open project: aegif/CmisSync Class Usage Examples

Public Properties

Property Type Description
DEFAULT_POLL_INTERVAL int
DEFAULT_URL_ADDRESS string

Protected Properties

Property Type Description
Logger log4net.ILog

Public Methods

Method Description
AddFolder ( RepoInfo repoInfo ) : void

Add a synchronized folder to the configuration.

Config ( string fullPath ) : System

Constructor.

GetFolder ( string name ) : SyncConfig.Folder

Get folder based on name.

GetFolder ( string RemoteUrl, string UserName, string RepositoryId ) : SyncConfig.Folder

Get a folder based on RemoteUrl, UserName, and RepositoryId.

GetLog4NetConfig ( ) : XmlElement

Log4net configuration, as an XML tree readily usable by Log4net.

GetLogFilePath ( ) : string

Get the configured path to the log file.

RemoveFolder ( string repoName ) : void

Remove a synchronized folder from the configuration.

Save ( ) : void

Save the currently loaded (in memory) configuration back to the XML file.

SetLog4NetConfig ( XmlNode node ) : void

Sets a new XmlNode as Log4NetConfig. Is useful for config migration

Private Methods

Method Description
CreateConfigFromScratch ( ) : void

Create an initial XML configuration with default settings and zero remote folders.

CreateInitialConfigFile ( ) : void

Create the initial XML configuration file.

GetLogLevel ( ) : string
Load ( ) : void
createDefaultLog4NetElement ( ) : XmlElement

Method Details

AddFolder() public method

Add a synchronized folder to the configuration.
public AddFolder ( RepoInfo repoInfo ) : void
repoInfo RepoInfo
return void

Config() public method

Constructor.
public Config ( string fullPath ) : System
fullPath string
return System

GetFolder() public method

Get folder based on name.
public GetFolder ( string name ) : SyncConfig.Folder
name string
return SyncConfig.Folder

GetFolder() public method

Get a folder based on RemoteUrl, UserName, and RepositoryId.
public GetFolder ( string RemoteUrl, string UserName, string RepositoryId ) : SyncConfig.Folder
RemoteUrl string
UserName string
RepositoryId string
return SyncConfig.Folder

GetLog4NetConfig() public method

Log4net configuration, as an XML tree readily usable by Log4net.
public GetLog4NetConfig ( ) : XmlElement
return System.Xml.XmlElement

GetLogFilePath() public method

Get the configured path to the log file.
public GetLogFilePath ( ) : string
return string

RemoveFolder() public method

Remove a synchronized folder from the configuration.
public RemoveFolder ( string repoName ) : void
repoName string
return void

Save() public method

Save the currently loaded (in memory) configuration back to the XML file.
public Save ( ) : void
return void

SetLog4NetConfig() public method

Sets a new XmlNode as Log4NetConfig. Is useful for config migration
public SetLog4NetConfig ( XmlNode node ) : void
node System.Xml.XmlNode
return void

Property Details

DEFAULT_POLL_INTERVAL public_oe static_oe property

Default poll interval. It is used for any newly created synchronized folder. In milliseconds.
public static int DEFAULT_POLL_INTERVAL
return int

DEFAULT_URL_ADDRESS public_oe static_oe property

public static string DEFAULT_URL_ADDRESS
return string

Logger protected_oe static_oe property

Log.
protected static ILog,log4net Logger
return log4net.ILog