SmartFoxServer Silverlight API
SFSEvent..::.OnObjectReceivedDelegate Delegate
Namespaces ► SmartFoxClientAPI ► SFSEvent ► SFSEvent..::.OnObjectReceivedDelegate
Dispatched when an SFSObject is received.
Declaration Syntax

C# | Visual Basic | Visual C++

    public delegate void OnObjectReceivedDelegate(
    	SFSObject obj,
    	User sender
    )

    Public Delegate Sub OnObjectReceivedDelegate ( _
    	obj As SFSObject, _
    	sender As User _
    )

    public delegate void OnObjectReceivedDelegate(
    	SFSObject^ obj,
    	User^ sender
    )

Parameters

obj (SFSObject)
  the SFSObject object received.

sender (User)
  the User object representing the user that sent the SFSObject.

Remarks

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to handle an Actionscript object received from a user.
CopyC#

    SFSEvent.onObjectReceived += OnObjectReceived;

    public void OnObjectReceived(SFSObject obj, User sender)
    {
        // Assuming another client sent his X and Y positions in two properties called px, py
        Debug.WriteLine("Data received from user: " + sender.GetName());
        Debug.WriteLine("X = " + obj.GetString("px") + ", Y = " + obj.GetString("py"));
    }

See Also
SFSObject
User
SendObject(SFSObject, Int32)
SendObjectToGroup(SFSObject, List<(Of <(Int32>)>), Int32)

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