IJavaScriptCallbackContext
From Virtual World Web Wiki
When a message is received from a connected client UI script, this context is passed to your handler's Callback method if the reflection based proxy system isn't able to automatically map the message to one of your handler methods. It represents a deserialized JSON message with the properties of the root object exposed as a collection.
Remarks [edit]
Properties
- string Command {get;}
- The command. Essentially an alias for getting the "command" property
- IUIScriptHandle Handle {get;}
- The server Layer One script handle (channel) on which the message was received
- object Item {get;}
Methods
- bool ContainsKey(string key)
- Tests to see if a given property is present in the JSON message passed from the client
- JavaScriptMessage CreateMessage(string command)
- Constructs a new JavaScriptMessage to send to a connected client
- JavaScriptMessage CreateMessage(string command, Dictionary<string, object> args)
- Constructs a new JavaScriptMessage to send to a connected client
- JavaScriptMessage CreateMessage(string command, object args)
- Constructs a new JavaScriptMessage to send to a connected client
- T GetValue<T>(string key, T default = NULL)
- Returns the value of a script message property in a type-safe manner
- T GetValue<T>(string key, Func<object, T> convert)
- Returns the value of a script message property in a type-safe manner
- T[] GetValueArray<T>(string key)
- Returns the value of a script message property in a type-safe manner as an array of T