C# Класс Stumps.RuleSettingsHelper

A class that provides a friendly interface for managing the settings of a T:Stumps.IStumpRule object.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Add ( string settingName, bool value ) : void

Adds a specified boolean to the settings list.

Add ( string settingName, byte value ) : void

Adds a specified byte array to the settings list.

Add ( string settingName, int value ) : void

Adds a specified integer to the settings list.

Add ( string settingName, string value ) : void

Adds a specified string to the settings list.

FindBoolean ( string settingName, bool defaultValue ) : bool

Finds the T:System.Boolean value for the specified setting.

FindByteArray ( string settingName, byte defaultValue ) : byte[]

Finds the array of T:System.Byte values for the specified setting.

FindString ( string settingName, string defaultValue ) : string

Finds the T:System.String value for the specified setting.

RuleSettingsHelper ( ) : System

Initializes a new instance of the T:Stumps.RuleSettingsHelper class.

RuleSettingsHelper ( IEnumerable settings ) : System

Initializes a new instance of the T:Stumps.RuleSettingsHelper class.

ToEnumerableList ( ) : IEnumerable

Gets an enumearable list of the T:Stumps.RuleSetting objects.

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

Метод Описание
AddOrUpdateSetting ( string settingName, string value ) : void

Adds or udpates the value of a setting.

FindInteger ( string settingName, int defaultValue ) : int
FindSettingValue ( string settingName ) : string

Finds a specified value from the dictionary.

A null value is returned if the setting is not found.

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

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

Adds a specified boolean to the settings list.
is null.
public Add ( string settingName, bool value ) : void
settingName string The name of the setting.
value bool The value of the setting.
Результат void

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

Adds a specified byte array to the settings list.
is null. /// -or- /// is null. cannot have a length of '0'.
public Add ( string settingName, byte value ) : void
settingName string The name of the setting.
value byte The value of the setting.
Результат void

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

Adds a specified integer to the settings list.
is null.
public Add ( string settingName, int value ) : void
settingName string The name of the setting.
value int The value of the setting.
Результат void

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

Adds a specified string to the settings list.
/// is null. /// -or- /// is null. ///
public Add ( string settingName, string value ) : void
settingName string The name of the setting.
value string The value of the setting.
Результат void

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

Finds the T:System.Boolean value for the specified setting.
public FindBoolean ( string settingName, bool defaultValue ) : bool
settingName string The name of the setting.
defaultValue bool The default value of the setting if it is not found.
Результат bool

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

Finds the array of T:System.Byte values for the specified setting.
public FindByteArray ( string settingName, byte defaultValue ) : byte[]
settingName string The name of the setting.
defaultValue byte The default value of the setting if it is not found.
Результат byte[]

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

Finds the T:System.String value for the specified setting.
public FindString ( string settingName, string defaultValue ) : string
settingName string The name of the setting.
defaultValue string The default value of the setting if it is not found.
Результат string

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

Initializes a new instance of the T:Stumps.RuleSettingsHelper class.
public RuleSettingsHelper ( ) : System
Результат System

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

Initializes a new instance of the T:Stumps.RuleSettingsHelper class.
public RuleSettingsHelper ( IEnumerable settings ) : System
settings IEnumerable An enumerable collection of objects.
Результат System

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

Gets an enumearable list of the T:Stumps.RuleSetting objects.
public ToEnumerableList ( ) : IEnumerable
Результат IEnumerable