C# Класс Amazon.Runtime.Internal.Util.IniFile

Provides read/write access to a file in the INI format. This class is not threadsafe.
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
GetErrorMessage string
IsCommentOrBlank bool
IsProperty bool
IsSection bool
SeekProperty bool
SeekSection bool
TryParseProperty bool
TryParseSection bool
TrySeekSection bool
TrySeekSection bool
Validate void

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

Метод Описание
DeleteSection ( string sectionName ) : void

If the section exists, delete it from the INI file.

EditSection ( string sectionName, string>.List properties ) : void

Update the section with the properties given. If the section doesn't exist, it will be appended to the file. -Any properties that do exist in the section will be updated. -A null value for a property denotes that it should be deleted from the section -If any properties don't exist they will be appended to the end of the section in the same order they appear in the list.

EnsureSectionExists ( string sectionName ) : void

Check if the section exists. If not, append it to the end of the file.

IniFile ( string filePath ) : System

Construct a new IniFile.

ListSectionNames ( ) : HashSet
Persist ( ) : void

Persist the changes to this INI file to disk.

SectionExists ( string sectionName ) : bool

Determine if a section exists in the INI file.

ToString ( ) : string
TryGetSection ( Regex sectionNameRegex, string>.Dictionary &properties ) : bool

Return the properties for the section if it exists.

TryGetSection ( Regex sectionNameRegex, string &sectionName, string>.Dictionary &properties ) : bool

Return the properties for the section if it exists.

TryGetSection ( string sectionName, string>.Dictionary &properties ) : bool

Return the properties for the section if it exists.

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

Метод Описание
GetErrorMessage ( int lineNumber ) : string
IsCommentOrBlank ( string line ) : bool
IsProperty ( string line ) : bool
IsSection ( string line ) : bool
SeekProperty ( int &lineNumber, string &propertyName, string &propertyValue ) : bool
SeekSection ( int &lineNumber, string &sectionName ) : bool
TryParseProperty ( string line, string &propertyName, string &propertyValue ) : bool
TryParseSection ( string line, string &sectionName ) : bool
TrySeekSection ( Regex sectionNameRegex, int &lineNumber, string &sectionName ) : bool
TrySeekSection ( String sectionName, int &lineNumber ) : bool
Validate ( ) : void

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

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

If the section exists, delete it from the INI file.
public DeleteSection ( string sectionName ) : void
sectionName string section to delete
Результат void

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

Update the section with the properties given. If the section doesn't exist, it will be appended to the file. -Any properties that do exist in the section will be updated. -A null value for a property denotes that it should be deleted from the section -If any properties don't exist they will be appended to the end of the section in the same order they appear in the list.
public EditSection ( string sectionName, string>.List properties ) : void
sectionName string name of the section to operate on
properties string>.List ordered list of properties to add/update/delete
Результат void

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

Check if the section exists. If not, append it to the end of the file.
public EnsureSectionExists ( string sectionName ) : void
sectionName string section to ensure exists
Результат void

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

Construct a new IniFile.
public IniFile ( string filePath ) : System
filePath string path of the IniFile
Результат System

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

public ListSectionNames ( ) : HashSet
Результат HashSet

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

Persist the changes to this INI file to disk.
public Persist ( ) : void
Результат void

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

Determine if a section exists in the INI file.
public SectionExists ( string sectionName ) : bool
sectionName string name of section to look for
Результат bool

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

public ToString ( ) : string
Результат string

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

Return the properties for the section if it exists.
public TryGetSection ( Regex sectionNameRegex, string>.Dictionary &properties ) : bool
sectionNameRegex System.Text.RegularExpressions.Regex Regex to match name of section to get
properties string>.Dictionary properties contained in the section
Результат bool

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

Return the properties for the section if it exists.
public TryGetSection ( Regex sectionNameRegex, string &sectionName, string>.Dictionary &properties ) : bool
sectionNameRegex System.Text.RegularExpressions.Regex Regex to match name of section to get
sectionName string name of section if regex matches
properties string>.Dictionary properties contained in the section
Результат bool

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

Return the properties for the section if it exists.
public TryGetSection ( string sectionName, string>.Dictionary &properties ) : bool
sectionName string name of section to get
properties string>.Dictionary properties contained in the section
Результат bool