C# Class Elastacloud.AzureManagement.Fluent.Types.ConfigurationFile

Abstract base class used for all types of configuration file
Mostra file Open project: azurecoder/fluent-management Class Usage Examples

Public Methods

Method Description
PersistConfigurationFile ( ConfigurationFileType type ) : void

persists the configuration file to a well known location

RollbackConfigurationFile ( ) : void

Deletes and replaces the configuration - i.e. restores it back to the point it was at beforehand

SaveAs ( string filePath ) : void

Saves the updated version of the Xml document

ToString ( ) : string

Used to return the Xml representation for the current configuration file

Protected Methods

Method Description
ConfigurationFile ( System.Xml.Linq.XDocument doc ) : System

Sets the default XMl document of the configuration file

ConfigurationFile ( string name ) : System

Creates a new instance of the class and checks to see whether the file exists and can be loaded

GetFileExtension ( ) : string

Abstract method returns the file extension

Private Methods

Method Description
CheckFileExistsAndLoadOriginalVersion ( ) : void

Checks to see whether the original file loads correctly and

Method Details

ConfigurationFile() protected method

Sets the default XMl document of the configuration file
protected ConfigurationFile ( System.Xml.Linq.XDocument doc ) : System
doc System.Xml.Linq.XDocument
return System

ConfigurationFile() protected method

Creates a new instance of the class and checks to see whether the file exists and can be loaded
protected ConfigurationFile ( string name ) : System
name string
return System

GetFileExtension() protected abstract method

Abstract method returns the file extension
protected abstract GetFileExtension ( ) : string
return string

PersistConfigurationFile() public method

persists the configuration file to a well known location
public PersistConfigurationFile ( ConfigurationFileType type ) : void
type ConfigurationFileType
return void

RollbackConfigurationFile() public method

Deletes and replaces the configuration - i.e. restores it back to the point it was at beforehand
public RollbackConfigurationFile ( ) : void
return void

SaveAs() public method

Saves the updated version of the Xml document
public SaveAs ( string filePath ) : void
filePath string
return void

ToString() public method

Used to return the Xml representation for the current configuration file
public ToString ( ) : string
return string