SmartFoxServer Silverlight API
SFSEvent..::.OnExtensionResponseDelegate Delegate
NamespacesSmartFoxClientAPISFSEventSFSEvent..::.OnExtensionResponseDelegate
Dispatched when a command/response from a server-side extension is received.
Declaration Syntax
C#Visual BasicVisual C++
public delegate void OnExtensionResponseDelegate(
	Object dataObj,
	string type
)
Public Delegate Sub OnExtensionResponseDelegate ( _
	dataObj As Object, _
	type As String _
)
public delegate void OnExtensionResponseDelegate(
	Object^ dataObj, 
	String^ type
)
Parameters
dataObj (Object)
an object containing all the data sent by the server-side extension; by convention, a string property called _cmd should always be present, to distinguish between different responses coming from the same extension.
type (String)
one of the following response protocol types: XTMSG_TYPE_XML, XTMSG_TYPE_STR, XTMSG_TYPE_JSON. By default XTMSG_TYPE_XML is used.
Remarks

Version:
SmartFoxServer Pro

Examples
The following example shows how to handle an extension response.
CopyC#
SFSEvent.onExtensionResponse += OnExtensionResponse;

public void OnExtensionResponse(object data, string type)
{
    // Handle XML responses
    if (type == SmartFoxClient.XTMSG_TYPE_XML)
    {
        SFSObject responseData = (SFSObject)data;
        // TODO: check command and perform required actions
    }

    // Handle RAW responses
    else if (type == SmartFoxClient.XTMSG_TYPE_STR)
    {
        string responseData = (string)data;
        // TODO: check command and perform required actions
    }

    // Handle JSON responses
    else if (type == SmartFoxClient.XTMSG_TYPE_JSON)
    {
        JsonData responseData = (JsonData)data;
        // TODO: check command and perform required actions
    }
}
See Also

Assembly: SmartFoxClientAPI_Silverlight (Module: SmartFoxClientAPI_Silverlight) Version: 1.0.0.0 (1.0.0.0)