C# 클래스 SIL.FieldWorks.FDO.DomainServices.Db4OLocalClientServerServices

The helper class that configures local servers in an FDO system where the backed can be either a Db4o backend that provides client-server services or a single-user XML-based backend.
상속: ILocalClientServerServices
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ConvertAllProjectsToDb4o bool
ConvertAllProjectsToDb4o object
ConvertAllProjectsToXml bool
ConvertAllProjectsToXmlTask object
EnsureNoClientsAreConnected bool
EnsureNoClientsAreConnected bool
IsLocalServiceRunning bool
ReportConversionError void
WarnOfOtherConnectedClients bool

공개 메소드들

메소드 설명
ConvertToDb4oBackendIfNeeded ( IThreadedProgress progressDlg, string xmlFilename ) : string

Convert the specified project (assumed to be in the current Projects directory) to the current backend. This is used in Restore and New Project and when turning ShareMyProjects on.

CopyToXmlFile ( FdoCache source, string destDir ) : string

Copies the specified project (assumed to be in the current Projects directory) from the current backend to XML. This is used in Backup and when turning ShareMyProjects off. Returns the name of the temp file IF ANY; returns null if no copy was needed.

Db4OLocalClientServerServices ( IFdoUI ui, IFdoDirectories dirs ) : System
IdForLocalProject ( string projectName ) : string

Return the full ID that should be used to open the specified project, which is in the local projects directory. The input project name must NOT have an extension already.

ListConnectedClients ( string project ) : string[]

Finds all clients that are using specified project.

ListOpenProjects ( ) : string[]

Finds Client server projects that are in use.

ListRemoteConnectedClients ( string project ) : string[]

Finds all clients, except local host, that are using specified project.

RefreshProjectNames ( ) : void

Force the list of project names to be reloaded. (This is needed after deleting a project.)

SetProjectSharing ( bool fShare, IThreadedProgress progress ) : bool

Turns project sharing on or off.

WillProjectBeConverted ( string projectPath, string parentDirectory, string projectsDirectory ) : bool

Return true if the specified project (in the specified parent directory) will be converted as part of the process of converting the projects in projectsDirectory.

비공개 메소드들

메소드 설명
ConvertAllProjectsToDb4o ( IThreadedProgress progressDlg ) : bool

Converts all projects to db4o.

ConvertAllProjectsToDb4o ( IThreadedProgress progress, object args ) : object
ConvertAllProjectsToXml ( IThreadedProgress progressDlg ) : bool

Converts all projects to XML.

ConvertAllProjectsToXmlTask ( IThreadedProgress progress, object args ) : object
EnsureNoClientsAreConnected ( ) : bool

If any clients are still connected to any shared projects, display connected clients to user and allow the user to either recheck (wait) or cancel. TODO: allow the user to force disconnect clients. TODO: prevent new connections while in this shutdown phase. TODO: as an enhancement connected clients could be messaged and asked to disconnect.

EnsureNoClientsAreConnected ( string projectName ) : bool

If any clients are still connected to the server file, display connected clients to user give the user an option to recheck (wait), or cancel. TODO: allow the user to force disconnect clients. TODO: prevent new connections while in this shutdown phase. TODO: as an enhancement connected clients could be messaged and asked to disconnect.

IsLocalServiceRunning ( ) : bool
ReportConversionError ( string projectPath, Exception e ) : void
WarnOfOtherConnectedClients ( string projectName, string connectedClientsMsg ) : bool

Warns the of other connected clients.

메소드 상세

ConvertToDb4oBackendIfNeeded() 공개 메소드

Convert the specified project (assumed to be in the current Projects directory) to the current backend. This is used in Restore and New Project and when turning ShareMyProjects on.
public ConvertToDb4oBackendIfNeeded ( IThreadedProgress progressDlg, string xmlFilename ) : string
progressDlg IThreadedProgress The progress dialog (for getting a message box owner and/or /// ensuring we're invoking on the UI thread).
xmlFilename string The full path of the existing XML file for the project
리턴 string

CopyToXmlFile() 공개 메소드

Copies the specified project (assumed to be in the current Projects directory) from the current backend to XML. This is used in Backup and when turning ShareMyProjects off. Returns the name of the temp file IF ANY; returns null if no copy was needed.
public CopyToXmlFile ( FdoCache source, string destDir ) : string
source FdoCache The source cache
destDir string The destination directory for the converted copy if a /// conversion needs to be done.
리턴 string

Db4OLocalClientServerServices() 공개 메소드

public Db4OLocalClientServerServices ( IFdoUI ui, IFdoDirectories dirs ) : System
ui IFdoUI
dirs IFdoDirectories
리턴 System

IdForLocalProject() 공개 메소드

Return the full ID that should be used to open the specified project, which is in the local projects directory. The input project name must NOT have an extension already.
public IdForLocalProject ( string projectName ) : string
projectName string
리턴 string

ListConnectedClients() 공개 메소드

Finds all clients that are using specified project.
public ListConnectedClients ( string project ) : string[]
project string
리턴 string[]

ListOpenProjects() 공개 메소드

Finds Client server projects that are in use.
public ListOpenProjects ( ) : string[]
리턴 string[]

ListRemoteConnectedClients() 공개 메소드

Finds all clients, except local host, that are using specified project.
public ListRemoteConnectedClients ( string project ) : string[]
project string
리턴 string[]

RefreshProjectNames() 공개 메소드

Force the list of project names to be reloaded. (This is needed after deleting a project.)
public RefreshProjectNames ( ) : void
리턴 void

SetProjectSharing() 공개 메소드

Turns project sharing on or off.
public SetProjectSharing ( bool fShare, IThreadedProgress progress ) : bool
fShare bool if set to true, turn sharing on.
progress IThreadedProgress The progress dialog.
리턴 bool

WillProjectBeConverted() 공개 메소드

Return true if the specified project (in the specified parent directory) will be converted as part of the process of converting the projects in projectsDirectory.
public WillProjectBeConverted ( string projectPath, string parentDirectory, string projectsDirectory ) : bool
projectPath string
parentDirectory string
projectsDirectory string
리턴 bool