DOMDocument
From Virtual World Web Wiki
Represents a serialization and management boundary in a DOM tree. Serialization does not cross document boundaries. You can construct a document from other documents (as an server instance does for example). Generally a DOMDocument represents some server managed entity that has other meaning. There are several sub-classes of DOMDocument that represent several "well known" document types that introduce relevant formal properties. DOMDocument also defines the main DOM serialization / deserialization methods
- Inherits class: DOMObject
Remarks [edit]
Properties
- Guid ContextID {get; set;}
- The ID of the document's related server object. The meaning ContextID depends on the ContextType property.
- DOMDocumentContextType ContextType {get; set;}
- The type of server object represented by this DOM document.
- bool Editing {get; set;}
- Specifies if this document is being edited
- object HostObject {get; set;}
- Like "Tag", but mean to be used by a DOM host to associate a document with the server object it represents
- LatencyTracker LatencyTracker {get; set;}
- Used by the infrastructure for latency calculations
- int LightMapMode {get; set;}
- Specifies the ligh map mode to use in a scene. This probably doesn't belong on "document" but rather as a runtime-added property of scene documents
- long? ViewID {get; set;}
- The ID of the server ViewInfo represented by this document. This property should only be set on root documents of views
Events
- IdentifierChanged(EventHandler)
- Event is raised, when the document and its children identifiers have changed
Constructors
- DOMDocument(DOMObject[] children)
- Constructs a new DOMDocument, adding children at the same time
- DOMDocument(string title, DOMObject[] children)
- Constructs a new DOMDocument, setting a title and adding children at the same time
Methods
- T Deserialize<T>(Byte[] source, SerializationContext context)
- Deserializes the provided bytes into a DOM tree.
- T Deserialize<T>(Byte[] source, SerializationContextType contextType)
- Deserializes the provided bytes into a DOM tree.
- DOMObject Deserialize(Byte[] source, SerializationContextType contextType)
- Deserializes the provided bytes into a DOM tree.
- DOMObject Deserialize(Byte[] source, SerializationContext context)
- Deserializes the provided bytes into a DOM tree.
- T Deserialize<T>(Stream stream, SerializationContextType contextType)
- Deserializes the a DOM tree from a stream
- DOMObject DeserializeJSON(string json)
- Deserializes a DOM object from a json string.
- void ReID()
- Resets the ID property of this and all child objects using IDs generated by its root document
- void RunCurvePlayers()
- Runs the Update method on all DOMCurvePlayers in the document
- Byte[] Serialize<T>(T instance, SerializationContextType contextType)
- Serializes the provided DOM tree
- void Serialize<T>(Stream stream, T instance, SerializationContextType contextType)
- Serializes the provided DOM tree into the provided stream
- string SerializeJSON(DOMObject instance, Formatting formatting = Formatting.Indented)
- Serialized a DOMObject to a JSON string
- void SetLatencyTracker(LatencyTracker tracker)
- Sets the latency tracker for this document tree. Used by the server.