C# Класс FiftyOne.Foundation.Mobile.Configuration.Support

Utility methods for handling common configuration tasks such as converting virutal to physical paths, or retrieving configuration sections.
This class should not be called as it is part of the internal logic.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetFilePath ( string pathSetOnWebConfig ) : string

Returns a real path from a virtiual path.

GetWebApplicationSection ( string sectionName, bool isManadatory ) : ConfigurationSection

Returns the configuration section relating to the name provided. If the section is present in the web.config file this location is used. If it's present in the alternative configuration file then it will be return from there.

Приватные методы

Метод Описание
DoesDirectoryOrFileExist ( string pathSetOnWebConfig ) : bool
GetConfigurationContainingSectionGroupName ( string name ) : Configuration
GetConfigurationSectionFromAltConfig ( string sectionName, bool isMandatory ) : ConfigurationSection
InitMachineConfigFiles ( ) : string

Has to be a seperate method incase a medium trust security exception is generated.

MakeAbsolute ( string partialPath ) : string
OpenConfigFileMap ( ExeConfigurationFileMap configFileMap ) : Configuration
OpenConfigFileMap ( string configFileName ) : Configuration
RemoveTilda ( string partialPath ) : string
SectionGroupMatch ( ConfigurationSectionGroup group, string name ) : bool

Checks to determine if the group contains the section name requested.

SetConfigurationSection ( ConfigurationSection section, System configuration ) : bool

Replaces an existing section with the name provided with a new one.

SetConfigurationSectionFromAltConfig ( ConfigurationSection section ) : void

Sets the section name in the first valid alternative configuration file to the value contained in the section.

SetWebApplicationSection ( ConfigurationSection section ) : void

Sets the section name in the first valid configuration file to the value contained in the section.

Support ( ) : System

Gets the path to the machine config file. If medium trust is enabled the call will fail and web.config should be used.

Описание методов

GetFilePath() публичный статический Метод

Returns a real path from a virtiual path.
public static GetFilePath ( string pathSetOnWebConfig ) : string
pathSetOnWebConfig string
Результат string

GetWebApplicationSection() публичный статический Метод

Returns the configuration section relating to the name provided. If the section is present in the web.config file this location is used. If it's present in the alternative configuration file then it will be return from there.
Thrown if the section does not exist and the section is mandatory.
public static GetWebApplicationSection ( string sectionName, bool isManadatory ) : ConfigurationSection
sectionName string The name of the section to be returned.
isManadatory bool True if the section is mandatary.
Результат System.Configuration.ConfigurationSection