C# Класс FwRemoteDatabaseConnector.Db4oServerInfo

Singlton object that get created by .NET remoting.
Наследование: System.MarshalByRefObject
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_allServers List
m_runningServers RunningServerInfo>.Dictionary

Private Properties

Свойство Тип Описание
EnsureClientIsLocalHost void
GetCmObjectSurrogates byte[]
ListConnectedClients string[]
ListConnectedClients string[]
ListUniqueAddressConnectedToPort string[]
ListUniqueAddressConnectedToPorts string[]
PopulateServerList void
ShutdownAllServers void
StopServer bool

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

Метод Описание
AreProjectShared ( ) : bool

Gets a value indicating whether projects are shared. (Should only be called on local machine.)

CreateServerFile ( string projectName ) : void

Create a db4o database file of given name.

Db4oServerInfo ( ) : System

IsLocalHost ( string hostname ) : bool

Determine if a given host is local host or not.

ListRunningServers ( ) : string[]

TODO make this thread safe

ListServers ( ) : string[]

TODO make this thread safe

RefreshServerList ( ) : void

Reload the list of servers.

ShareProjects ( bool enableSharingOfProjects ) : void

Enables/disables sharing of projects from this machine.

StartServer ( string projectName, int &port, Exception &errorinfo ) : bool

Instruct the Service to start a db4o server.

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

Метод Описание
EnsureClientIsLocalHost ( ) : void

If the connected client isn't localhost throws SecurityException

GetCmObjectSurrogates ( string projectName ) : byte[]
ListConnectedClients ( ) : string[]
ListConnectedClients ( string projectName ) : string[]
ListUniqueAddressConnectedToPort ( int port ) : string[]
ListUniqueAddressConnectedToPorts ( IEnumerable ports ) : string[]
PopulateServerList ( ) : void
ShutdownAllServers ( ) : void

reset back to initial state. This is only used by unittests.

StopServer ( string projectName ) : bool

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

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

Gets a value indicating whether projects are shared. (Should only be called on local machine.)
If called from a remote machine.
public AreProjectShared ( ) : bool
Результат bool

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

Create a db4o database file of given name.
public CreateServerFile ( string projectName ) : void
projectName string the desired name.
Результат void

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

public Db4oServerInfo ( ) : System
Результат System

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

Determine if a given host is local host or not.
public IsLocalHost ( string hostname ) : bool
hostname string host name or ipaddress
Результат bool

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

TODO make this thread safe
public ListRunningServers ( ) : string[]
Результат string[]

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

TODO make this thread safe
public ListServers ( ) : string[]
Результат string[]

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

Reload the list of servers.
public RefreshServerList ( ) : void
Результат void

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

Enables/disables sharing of projects from this machine.
if called from a remote machine or if current /// user does not have permission to write to HKLM
public ShareProjects ( bool enableSharingOfProjects ) : void
enableSharingOfProjects bool if set to true enable sharing of /// projects; otherwise, disable sharing.
Результат void

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

Instruct the Service to start a db4o server.
public StartServer ( string projectName, int &port, Exception &errorinfo ) : bool
projectName string Name of the project to start
port int If succesfully started then set to the port number of the running /// database
errorinfo System.Exception Will be set to the exception if server failed to start
Результат bool

Описание свойств

m_allServers защищенное свойство

Stores the filenames of all the db40 Servers
protected List m_allServers
Результат List

m_runningServers защищенное свойство

Maps db4o project name (not filename!) to port it is listening on
protected Dictionary m_runningServers
Результат RunningServerInfo>.Dictionary