C# Класс Zetbox.Server.ZetboxService

Implements the main service interface.
Наследование: IZetboxService, IDisposable
Показать файл Открыть проект

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

Метод Описание
Dispose ( ) : void
FetchRelation ( System.Guid version, System.Guid relId, int serializableRole, int parentObjID ) : byte[]

Fetches a list of CollectionEntry objects of the Relation relId which are owned by the object with the ID parentObjID in the role serializableRole.

GetBlobStream ( System.Guid version, int ID ) : Stream

Gets the content stream of the given Document instance ID

GetObjects ( System.Guid version, SerializableExpression query ) : byte[]

Returns a list of objects from the datastore, as requested by the query.

InvokeServerMethod ( System.Guid version, SerializableType type, int ID, string method, SerializableType parameterTypes, byte parameterArray, byte changedObjectsArray, ObjectNotificationRequest notificationRequests, byte &retChangedObjects ) : byte[]
SetBlobStream ( BlobMessage blob ) : BlobResponse

Sets the content stream of the given Document instance ID

SetObjects ( System.Guid version, byte msgArray, ObjectNotificationRequest notificationRequests ) : byte[]

Puts a number of changed objects into the database. The resultant objects are sent back to the client.

ZetboxService ( IServerObjectHandlerFactory sohFactory, Func ctxFactory, InterfaceType iftFactory, IPerfCounter perfCounter, ZetboxStreamReader readerFactory, ZetboxStreamWriter writerFactory ) : System

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

Метод Описание
DebugLogIdentity ( ) : void
GetListOf ( System.Guid version, SerializableType type, int ID, string property ) : byte[]
ReadObjects ( Stream msg, IZetboxContext ctx ) : List
SendAuxiliaryObjects ( ZetboxStreamWriter sw, HashSet auxObjects, HashSet sentObjects, bool eagerLoadLists ) : void

Sends a list of auxiliary objects to the specified ZetboxStreamWriter while avoiding to send objects twice.

SendObjects ( IEnumerable lst, bool eagerLoadLists ) : MemoryStream

Serializes a list of objects onto a MemoryStream.

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

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

public Dispose ( ) : void
Результат void

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

Fetches a list of CollectionEntry objects of the Relation relId which are owned by the object with the ID parentObjID in the role serializableRole.
public FetchRelation ( System.Guid version, System.Guid relId, int serializableRole, int parentObjID ) : byte[]
version System.Guid Current version of generated Zetbox.Objects assembly
relId System.Guid the requested Relation
serializableRole int the parent role (1 == A, 2 == B)
parentObjID int the ID of the parent object
Результат byte[]

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

Gets the content stream of the given Document instance ID
public GetBlobStream ( System.Guid version, int ID ) : Stream
version System.Guid Current version of generated Zetbox.Objects assembly
ID int ID of an valid Document instance
Результат Stream

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

Returns a list of objects from the datastore, as requested by the query.
public GetObjects ( System.Guid version, SerializableExpression query ) : byte[]
version System.Guid Current version of generated Zetbox.Objects assembly
query SerializableExpression A full LINQ query returning zero, one or more objects (FirstOrDefault, Single, Where, Skip, Take, etc.)
Результат byte[]

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

public InvokeServerMethod ( System.Guid version, SerializableType type, int ID, string method, SerializableType parameterTypes, byte parameterArray, byte changedObjectsArray, ObjectNotificationRequest notificationRequests, byte &retChangedObjects ) : byte[]
version System.Guid
type Zetbox.API.SerializableType
ID int
method string
parameterTypes Zetbox.API.SerializableType
parameterArray byte
changedObjectsArray byte
notificationRequests Zetbox.API.ObjectNotificationRequest
retChangedObjects byte
Результат byte[]

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

Sets the content stream of the given Document instance ID
public SetBlobStream ( BlobMessage blob ) : BlobResponse
blob Zetbox.API.BlobMessage Information about the given blob
Результат Zetbox.API.BlobResponse

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

Puts a number of changed objects into the database. The resultant objects are sent back to the client.
public SetObjects ( System.Guid version, byte msgArray, ObjectNotificationRequest notificationRequests ) : byte[]
version System.Guid Current version of generated Zetbox.Objects assembly
msgArray byte a streamable list of s
notificationRequests Zetbox.API.ObjectNotificationRequest A list of objects the client wants to be notified about, if they change.
Результат byte[]

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

public ZetboxService ( IServerObjectHandlerFactory sohFactory, Func ctxFactory, InterfaceType iftFactory, IPerfCounter perfCounter, ZetboxStreamReader readerFactory, ZetboxStreamWriter writerFactory ) : System
sohFactory IServerObjectHandlerFactory
ctxFactory Func
iftFactory Zetbox.API.InterfaceType
perfCounter IPerfCounter
readerFactory ZetboxStreamReader
writerFactory ZetboxStreamWriter
Результат System