C# Class Zetbox.Server.ZetboxService

Implements the main service interface.
Inheritance: IZetboxService, IDisposable
Afficher le fichier Open project: daszat/zetbox

Méthodes publiques

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

Private Methods

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

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

FetchRelation() public méthode

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
Résultat byte[]

GetBlobStream() public méthode

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

GetObjects() public méthode

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.)
Résultat byte[]

InvokeServerMethod() public méthode

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
Résultat byte[]

SetBlobStream() public méthode

Sets the content stream of the given Document instance ID
public SetBlobStream ( BlobMessage blob ) : BlobResponse
blob Zetbox.API.BlobMessage Information about the given blob
Résultat Zetbox.API.BlobResponse

SetObjects() public méthode

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.
Résultat byte[]

ZetboxService() public méthode

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