C# Класс ACAT.Lib.Core.AbbreviationsManagement.Abbreviations

Represents a sorted list of abbreviation objects. The list of abbreviations is created by parsing the xml file that has a list of all the abbreviations.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Add ( ACAT.Lib.Core.AbbreviationsManagement.Abbreviation abbreviation ) : bool

Adds the abbreviation object to the list. If it already exists, it is replaced.

Clear ( ) : void

Clears all the abbreviations in the list

Dispose ( ) : void

Disposes resources

Exists ( String abbreviation ) : bool

Checks if an abbreviation already exists in the list

Load ( String abbreviationsFile = null ) : bool

Loads abbreviations from the specified file. If filename is null, loads from the default file. Parses the XML file and populates the sorted list

Lookup ( String mnemonic ) : ACAT.Lib.Core.AbbreviationsManagement.Abbreviation

Returns the abbreviation object that corresponds to the mnemonic

Remove ( String abbreviation ) : bool

Removes an abbreviation from the list

Save ( ) : bool

Saves all the abbreviations from the sorted list to the abbreviations file

Update ( ACAT.Lib.Core.AbbreviationsManagement.Abbreviation abbreviation ) : bool

Updates an existing abbreviation object.

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

Метод Описание
Dispose ( bool disposing ) : void

Disposer. Release resources and cleanup.

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

Метод Описание
closeAbbreviationFile ( XmlWriter xmlTextWriter ) : void

Writes the closing xml element and closes the xmltextwriter object

createAbbreviationsFile ( String fileName ) : XmlTextWriter

Creates an empty abbreviations file

createAndAddAbbreviation ( XmlNode node ) : void

Parses the xml node attributes from the xml nodeand creates an abbreviation object adds it to the sorted list

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

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

Adds the abbreviation object to the list. If it already exists, it is replaced.
public Add ( ACAT.Lib.Core.AbbreviationsManagement.Abbreviation abbreviation ) : bool
abbreviation ACAT.Lib.Core.AbbreviationsManagement.Abbreviation Abbreviation to add
Результат bool

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

Clears all the abbreviations in the list
public Clear ( ) : void
Результат void

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

Disposes resources
public Dispose ( ) : void
Результат void

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

Disposer. Release resources and cleanup.
protected Dispose ( bool disposing ) : void
disposing bool true to dispose managed resources
Результат void

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

Checks if an abbreviation already exists in the list
public Exists ( String abbreviation ) : bool
abbreviation String the mnemonic
Результат bool

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

Loads abbreviations from the specified file. If filename is null, loads from the default file. Parses the XML file and populates the sorted list
public Load ( String abbreviationsFile = null ) : bool
abbreviationsFile String name of the abbreviations file
Результат bool

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

Returns the abbreviation object that corresponds to the mnemonic
public Lookup ( String mnemonic ) : ACAT.Lib.Core.AbbreviationsManagement.Abbreviation
mnemonic String Mnemonic to look for
Результат ACAT.Lib.Core.AbbreviationsManagement.Abbreviation

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

Removes an abbreviation from the list
public Remove ( String abbreviation ) : bool
abbreviation String mnemonic of abbr to remove
Результат bool

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

Saves all the abbreviations from the sorted list to the abbreviations file
public Save ( ) : bool
Результат bool

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

Updates an existing abbreviation object.
public Update ( ACAT.Lib.Core.AbbreviationsManagement.Abbreviation abbreviation ) : bool
abbreviation ACAT.Lib.Core.AbbreviationsManagement.Abbreviation Abbreviation to update
Результат bool