C# Class SIL.CoreImpl.GlobalFileWritingSystemStore

Inheritance: IFwWritingSystemStore
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
GetFileName ( IWritingSystemDefinition ws ) : string
GetFileName ( string identifier ) : string
GetFilePath ( IWritingSystemDefinition ws ) : string
GetFilePath ( string identifier ) : string
GetFromFilePath ( string filePath ) : IWritingSystemDefinition
GlobalFileWritingSystemStore ( string path ) : System

Method Details

CanSave() public méthode

Since the current implementation of Save does nothing, it's always possible.
public CanSave ( WritingSystemDefinition ws, string &path ) : bool
ws WritingSystemDefinition
path string
Résultat bool

CanSet() public méthode

Returns true if a call to Set should succeed, false if a call to Set would throw
public CanSet ( IWritingSystemDefinition ws ) : bool
ws IWritingSystemDefinition
Résultat bool

Conflate() public méthode

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
Résultat void

Contains() public méthode

Returns true if a writing system with the given Store ID exists in the store
public Contains ( string identifier ) : bool
identifier string
Résultat bool

CreateNew() public méthode

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
Résultat IWritingSystemDefinition

Exists() public méthode

Obsolete method retained because required by interface defn for backwards compatibility
public Exists ( string identifier ) : bool
identifier string
Résultat bool

FilterForTextIds() public méthode

Added to satisfy IWritingSystemRepository definition...implementation copied from WritingSystemRepositoryBase
public FilterForTextIds ( IEnumerable idsToFilter ) : IEnumerable
idsToFilter IEnumerable
Résultat IEnumerable

Get() public méthode

Gets the writing system object for the given Store ID
public Get ( string identifier ) : IWritingSystemDefinition
identifier string
Résultat IWritingSystemDefinition

GetNewStoreIDWhenSet() public méthode

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
Résultat string

GetWsForInputLanguage() public méthode

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
Résultat IWritingSystemDefinition

GetWsForInputMethod() public méthode

Only needed in local store
public GetWsForInputMethod ( IKeyboardDefinition keyboard, IWritingSystemDefinition wsCurrent, IWritingSystemDefinition candidates ) : IWritingSystemDefinition
keyboard IKeyboardDefinition
wsCurrent IWritingSystemDefinition
candidates IWritingSystemDefinition
Résultat IWritingSystemDefinition

GlobalFileWritingSystemStore() public méthode

Initializes a new instance of the GlobalFileWritingSystemStore class.
public GlobalFileWritingSystemStore ( ) : System
Résultat System

LastChecked() public méthode

public LastChecked ( string identifier, System.DateTime dateModified ) : void
identifier string The identifier.
dateModified System.DateTime The date modified.
Résultat void

MakeDuplicate() public méthode

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
Résultat IWritingSystemDefinition

OnWritingSystemIDChange() public méthode

Added to satisfy definition of IWritingSystemRepository...do we need to do anything?
public OnWritingSystemIDChange ( IWritingSystemDefinition ws, string oldId ) : void
ws IWritingSystemDefinition
oldId string
Résultat void

Remove() public méthode

Removes the writing system with the specified Store ID from the store.
public Remove ( string identifier ) : void
identifier string
Résultat void

Save() public méthode

Writes the store to a persistable medium, if applicable.
public Save ( ) : void
Résultat void

Set() public méthode

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
Résultat void

TryGet() public méthode

Gets the specified writing system if it exists.
public TryGet ( string identifier, IWritingSystemDefinition &ws ) : bool
identifier string The identifier.
ws IWritingSystemDefinition The writing system.
Résultat bool

WritingSystemIdHasChanged() public méthode

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
Résultat bool

WritingSystemIdHasChangedTo() public méthode

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
Résultat string

WritingSystemsNewerIn() public méthode

Returns a list of writing systems from rhs which are newer than ones in the store.
public WritingSystemsNewerIn ( IEnumerable rhs ) : IEnumerable
rhs IEnumerable
Résultat IEnumerable