C# Класс SIL.CoreImpl.GlobalFileWritingSystemStore

Наследование: IFwWritingSystemStore
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CanSave ( WritingSystemDefinition ws, string &path ) : bool

Since the current implementation of Save does nothing, it's always possible.

CanSet ( IWritingSystemDefinition ws ) : bool

Returns true if a call to Set should succeed, false if a call to Set would throw

Conflate ( string wsToConflate, string wsToConflateWith ) : void

This is a new required interface member. We don't use it, and I hope we don't use anything which uses it!

Contains ( string identifier ) : bool

Returns true if a writing system with the given Store ID exists in the store

CreateNew ( ) : IWritingSystemDefinition

Creates a new writing system object and returns it. Set will need to be called once identifying information has been changed in order to save it in the store.

Exists ( string identifier ) : bool

Obsolete method retained because required by interface defn for backwards compatibility

FilterForTextIds ( IEnumerable idsToFilter ) : IEnumerable

Added to satisfy IWritingSystemRepository definition...implementation copied from WritingSystemRepositoryBase

Get ( string identifier ) : IWritingSystemDefinition

Gets the writing system object for the given Store ID

GetNewStoreIDWhenSet ( IWritingSystemDefinition ws ) : string

If the given writing system were passed to Set, this function returns the new StoreID that would be assigned.

GetWsForInputLanguage ( string layoutName, CultureInfo cultureInfo, IWritingSystemDefinition wsCurrent, IWritingSystemDefinition candidates ) : IWritingSystemDefinition

Only needed in local store

GetWsForInputMethod ( IKeyboardDefinition keyboard, IWritingSystemDefinition wsCurrent, IWritingSystemDefinition candidates ) : IWritingSystemDefinition

Only needed in local store

GlobalFileWritingSystemStore ( ) : System

Initializes a new instance of the GlobalFileWritingSystemStore class.

LastChecked ( string identifier, System.DateTime dateModified ) : void

MakeDuplicate ( IWritingSystemDefinition definition ) : IWritingSystemDefinition

Makes a duplicate of an existing writing system definition. Set will need to be called with this new duplicate once identifying information has been changed in order to place the new definition in the store.

OnWritingSystemIDChange ( IWritingSystemDefinition ws, string oldId ) : void

Added to satisfy definition of IWritingSystemRepository...do we need to do anything?

Remove ( string identifier ) : void

Removes the writing system with the specified Store ID from the store.

Save ( ) : void

Writes the store to a persistable medium, if applicable.

Set ( IWritingSystemDefinition ws ) : void

Adds the writing system to the store or updates the store information about an already-existing writing system. Set should be called when there is a change that updates the RFC5646 information.

TryGet ( string identifier, IWritingSystemDefinition &ws ) : bool

Gets the specified writing system if it exists.

WritingSystemIdHasChanged ( string id ) : bool

This is used by the orphan finder, which we don't use (yet). It tells whether, typically in the scope of some current change log, a writing system ID has changed to something else...call WritingSystemIdHasChangedTo to find out what.

WritingSystemIdHasChangedTo ( string id ) : string

This is used by the orphan finder, which we don't use (yet). It tells what, typically in the scope of some current change log, a writing system ID has changed to.

WritingSystemsNewerIn ( IEnumerable rhs ) : IEnumerable

Returns a list of writing systems from rhs which are newer than ones in the store.

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

Метод Описание
GetFileName ( IWritingSystemDefinition ws ) : string
GetFileName ( string identifier ) : string
GetFilePath ( IWritingSystemDefinition ws ) : string
GetFilePath ( string identifier ) : string
GetFromFilePath ( string filePath ) : IWritingSystemDefinition
GlobalFileWritingSystemStore ( string path ) : System

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

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

Since the current implementation of Save does nothing, it's always possible.
public CanSave ( WritingSystemDefinition ws, string &path ) : bool
ws WritingSystemDefinition
path string
Результат bool

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

Returns true if a call to Set should succeed, false if a call to Set would throw
public CanSet ( IWritingSystemDefinition ws ) : bool
ws IWritingSystemDefinition
Результат bool

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

This is a new required interface member. We don't use it, and I hope we don't use anything which uses it!
public Conflate ( string wsToConflate, string wsToConflateWith ) : void
wsToConflate string
wsToConflateWith string
Результат void

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

Returns true if a writing system with the given Store ID exists in the store
public Contains ( string identifier ) : bool
identifier string
Результат bool

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

Creates a new writing system object and returns it. Set will need to be called once identifying information has been changed in order to save it in the store.
public CreateNew ( ) : IWritingSystemDefinition
Результат IWritingSystemDefinition

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

Obsolete method retained because required by interface defn for backwards compatibility
public Exists ( string identifier ) : bool
identifier string
Результат bool

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

Added to satisfy IWritingSystemRepository definition...implementation copied from WritingSystemRepositoryBase
public FilterForTextIds ( IEnumerable idsToFilter ) : IEnumerable
idsToFilter IEnumerable
Результат IEnumerable

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

Gets the writing system object for the given Store ID
public Get ( string identifier ) : IWritingSystemDefinition
identifier string
Результат IWritingSystemDefinition

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

If the given writing system were passed to Set, this function returns the new StoreID that would be assigned.
public GetNewStoreIDWhenSet ( IWritingSystemDefinition ws ) : string
ws IWritingSystemDefinition
Результат string

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

Only needed in local store
public GetWsForInputLanguage ( string layoutName, CultureInfo cultureInfo, IWritingSystemDefinition wsCurrent, IWritingSystemDefinition candidates ) : IWritingSystemDefinition
layoutName string
cultureInfo System.Globalization.CultureInfo
wsCurrent IWritingSystemDefinition
candidates IWritingSystemDefinition
Результат IWritingSystemDefinition

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

Only needed in local store
public GetWsForInputMethod ( IKeyboardDefinition keyboard, IWritingSystemDefinition wsCurrent, IWritingSystemDefinition candidates ) : IWritingSystemDefinition
keyboard IKeyboardDefinition
wsCurrent IWritingSystemDefinition
candidates IWritingSystemDefinition
Результат IWritingSystemDefinition

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

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

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

public LastChecked ( string identifier, System.DateTime dateModified ) : void
identifier string The identifier.
dateModified System.DateTime The date modified.
Результат void

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

Makes a duplicate of an existing writing system definition. Set will need to be called with this new duplicate once identifying information has been changed in order to place the new definition in the store.
public MakeDuplicate ( IWritingSystemDefinition definition ) : IWritingSystemDefinition
definition IWritingSystemDefinition
Результат IWritingSystemDefinition

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

Added to satisfy definition of IWritingSystemRepository...do we need to do anything?
public OnWritingSystemIDChange ( IWritingSystemDefinition ws, string oldId ) : void
ws IWritingSystemDefinition
oldId string
Результат void

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

Removes the writing system with the specified Store ID from the store.
public Remove ( string identifier ) : void
identifier string
Результат void

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

Writes the store to a persistable medium, if applicable.
public Save ( ) : void
Результат void

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

Adds the writing system to the store or updates the store information about an already-existing writing system. Set should be called when there is a change that updates the RFC5646 information.
public Set ( IWritingSystemDefinition ws ) : void
ws IWritingSystemDefinition
Результат void

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

Gets the specified writing system if it exists.
public TryGet ( string identifier, IWritingSystemDefinition &ws ) : bool
identifier string The identifier.
ws IWritingSystemDefinition The writing system.
Результат bool

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

This is used by the orphan finder, which we don't use (yet). It tells whether, typically in the scope of some current change log, a writing system ID has changed to something else...call WritingSystemIdHasChangedTo to find out what.
public WritingSystemIdHasChanged ( string id ) : bool
id string
Результат bool

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

This is used by the orphan finder, which we don't use (yet). It tells what, typically in the scope of some current change log, a writing system ID has changed to.
public WritingSystemIdHasChangedTo ( string id ) : string
id string
Результат string

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

Returns a list of writing systems from rhs which are newer than ones in the store.
public WritingSystemsNewerIn ( IEnumerable rhs ) : IEnumerable
rhs IEnumerable
Результат IEnumerable