C# Класс Elastacloud.AzureManagement.Fluent.Types.CscfgFile

Used to encapsulate a .cscfg file and be able to pull properties from it
Наследование: ConfigurationFile
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Instance ConfigurationFile

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

Метод Описание
DoesSettingExist ( string settingName, int roleIndex = 1 ) : bool

Checks to see whether a particular setting exists in the roleset

GetAdHocInstance ( System.Xml.Linq.XDocument doc ) : CscfgFile

Used to get an ad-hoc reference to the .cscfg file to parse out the settings

GetInstance ( string name ) : ConfigurationFile

Singleton for the file

GetInstanceCountForRole ( string roleName ) : int

Gets the instance count for a particular role name

GetRoleNameList ( ) : List

Gets a list of role names from the .cscfg file

GetSettingForRole ( string settingName, string roleName ) : string

Gets a setting value for a role given a rolename and settings name

GetSettingWithoutRole ( string settingName ) : string

Returns a setting without needing to have a role to look up

SetInstanceCountForRole ( string roleName, int instanceCount ) : void

Sets an instance count attribute value for a particular role

UpdateSettingForRole ( string settingName, string settingValue, string roleName ) : void

Updates an existing setting for a role with the predetermined value

Защищенные методы

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

Used to get the file instance

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

Метод Описание
CscfgFile ( System.Xml.Linq.XDocument doc ) : System.Collections.Generic

Used to generate ad-hoc instances of the .cscfg file

CscfgFile ( string name ) : System.Collections.Generic

Default constructor used to load and find the file

GetInstanceCountElementForRole ( string roleName ) : System.Xml.Linq.XElement

Gets the instance count for the role

GetSetting ( string settingName ) : System.Xml.Linq.XElement

Checks to see whether a particular setting exists in the roleset

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

DoesSettingExist() публичный Метод

Checks to see whether a particular setting exists in the roleset
public DoesSettingExist ( string settingName, int roleIndex = 1 ) : bool
settingName string The name of the setting being checked
roleIndex int Not implemented but can be used to go to a particular role index based on the order of the XML Cscfg file
Результат bool

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

Used to get an ad-hoc reference to the .cscfg file to parse out the settings
public static GetAdHocInstance ( System.Xml.Linq.XDocument doc ) : CscfgFile
doc System.Xml.Linq.XDocument
Результат CscfgFile

GetFileExtension() защищенный Метод

Used to get the file instance
protected GetFileExtension ( ) : string
Результат string

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

Singleton for the file
public static GetInstance ( string name ) : ConfigurationFile
name string
Результат ConfigurationFile

GetInstanceCountForRole() публичный Метод

Gets the instance count for a particular role name
public GetInstanceCountForRole ( string roleName ) : int
roleName string
Результат int

GetRoleNameList() публичный Метод

Gets a list of role names from the .cscfg file
public GetRoleNameList ( ) : List
Результат List

GetSettingForRole() публичный Метод

Gets a setting value for a role given a rolename and settings name
public GetSettingForRole ( string settingName, string roleName ) : string
settingName string
roleName string
Результат string

GetSettingWithoutRole() публичный Метод

Returns a setting without needing to have a role to look up
public GetSettingWithoutRole ( string settingName ) : string
settingName string The name of the setting
Результат string

SetInstanceCountForRole() публичный Метод

Sets an instance count attribute value for a particular role
public SetInstanceCountForRole ( string roleName, int instanceCount ) : void
roleName string the name of the role
instanceCount int the number of instance of the role
Результат void

UpdateSettingForRole() публичный Метод

Updates an existing setting for a role with the predetermined value
public UpdateSettingForRole ( string settingName, string settingValue, string roleName ) : void
settingName string
settingValue string
roleName string
Результат void

Описание свойств

Instance публичное статическое свойство

The single instance of the file
public static ConfigurationFile,Elastacloud.AzureManagement.Fluent.Types Instance
Результат ConfigurationFile