C# Class SIL.FieldWorks.FDO.Infrastructure.Impl.XMLBackendProvider

A subclass of the FDOBackendProvider which handles an XML file-based system.
Inheritance: SIL.FieldWorks.FDO.Infrastructure.Impl.FDOBackendProvider
Show file Open project: sillsdev/FieldWorks

Public Methods

Method Description
Commit ( HashSet newbies, HashSet dirtballs, HashSet goners ) : bool

Update the backend store.

CompleteAllCommits ( ) : void

The XML backend has finished all commits when its write thread is idle.

IsProjectLocked ( string projectPath ) : bool
RenameDatabase ( string sNewProjectName ) : bool

Rename the database, which means renaming the files.

Protected Methods

Method Description
CreateInternal ( ) : void

Create a LangProject with the BEP.

MakeSurrogate ( byte xmlBytes ) : void
PerformCommit ( HashSet newbies, HashSet dirtballs, HashSet goners, IEnumerable customFields ) : void
ReadInSurrogates ( int currentModelVersion ) : int
ShutdownInternal ( ) : void

Shutdown the BEP.

StartupInternal ( int currentModelVersion ) : int

Start the BEP.

UpdateVersionNumber ( ) : void

Update the version number.

WriteCommitWork ( CommitWork workItem ) : void

Private Methods

Method Description
CopyTempFileToOriginal ( bool fUseLocalTempFile, string mainPathname, string tempPathname ) : void
GetActualModelVersionNumber ( string path ) : int
GetAttribute ( byte name, byte input ) : string
IsLocalDrive ( string path ) : bool
LockProject ( ) : void
OfferToRestore ( string message ) : void
ReportDuplicateGuidsIfTheyExist ( ) : void
ReportProblem ( string message, string tempPath ) : void
UnlockProject ( ) : void
Work ( CommitWork>.IQueueAccessor queueAccessor ) : void

Performs the actual commit operation.

XMLBackendProvider ( FdoCache cache, IdentityMap identityMap, ICmObjectSurrogateFactory surrogateFactory, IFwMetaDataCacheManagedInternal mdc, IDataMigrationManager dataMigrationManager, IFdoUI ui, IFdoDirectories dirs, FdoSettings settings ) : System

Constructor.

Method Details

Commit() public method

Update the backend store.
public Commit ( HashSet newbies, HashSet dirtballs, HashSet goners ) : bool
newbies HashSet The newly created objects
dirtballs HashSet The recently modified objects
goners HashSet The recently deleted objects
return bool

CompleteAllCommits() public method

The XML backend has finished all commits when its write thread is idle.
public CompleteAllCommits ( ) : void
return void

CreateInternal() protected method

Create a LangProject with the BEP.
protected CreateInternal ( ) : void
return void

IsProjectLocked() public static method

public static IsProjectLocked ( string projectPath ) : bool
projectPath string
return bool

MakeSurrogate() protected method

protected MakeSurrogate ( byte xmlBytes ) : void
xmlBytes byte
return void

PerformCommit() protected method

protected PerformCommit ( HashSet newbies, HashSet dirtballs, HashSet goners, IEnumerable customFields ) : void
newbies HashSet
dirtballs HashSet
goners HashSet
customFields IEnumerable
return void

ReadInSurrogates() protected method

protected ReadInSurrogates ( int currentModelVersion ) : int
currentModelVersion int
return int

RenameDatabase() public method

Rename the database, which means renaming the files.
public RenameDatabase ( string sNewProjectName ) : bool
sNewProjectName string
return bool

ShutdownInternal() protected method

Shutdown the BEP.
protected ShutdownInternal ( ) : void
return void

StartupInternal() protected method

Start the BEP.
protected StartupInternal ( int currentModelVersion ) : int
currentModelVersion int The current model version.
return int

UpdateVersionNumber() protected method

Update the version number.
protected UpdateVersionNumber ( ) : void
return void

WriteCommitWork() protected method

protected WriteCommitWork ( CommitWork workItem ) : void
workItem CommitWork
return void