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.
파일 보기 프로젝트 열기: 51Degrees/dotNET-Device-Detection 1 사용 예제들

공개 메소드들

메소드 설명
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