SmartFoxServer Unity/.NET API
SFSEvent..::.OnBuddyListDelegate Delegate
NamespacesSmartFoxClientAPISFSEventSFSEvent..::.OnBuddyListDelegate
Dispatched when the buddy list for the current user is received or a buddy is added/removed.
Declaration Syntax
C#Visual BasicVisual C++
public delegate void OnBuddyListDelegate(
	ArrayList buddyList
)
Public Delegate Sub OnBuddyListDelegate ( _
	buddyList As ArrayList _
)
public delegate void OnBuddyListDelegate(
	ArrayList^ buddyList
)
Parameters
buddyList (ArrayList)
the buddy list. Refer to the buddyList property for a description of the buddy object's properties.
Remarks

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to retrieve the properties of each buddy when the buddy list is received.
CopyC#
SFSEvent.onBuddyList += OnBuddyList;

smartFox.LoadBuddyList();

public void OnBuddyList(ArrayList buddyList)
{
    foreach (Buddy buddy in buddyList)
    {
        Trace.WriteLine("Buddy id: " + buddy.GetId());
        Trace.WriteLine("Buddy name: " + buddy.GetName());
        Trace.WriteLine("Is buddy online? " + buddy.IsOnline());
        Trace.WriteLine("Is buddy blocked? " + buddy.IsBlocked());

        Trace.WriteLine("Buddy Variables:");
        foreach (string v in buddy.GetVariables().Keys)
            Trace.WriteLine("\t" + v + " -- " + buddy.GetVariable{v});
    }
}
See Also

Assembly: SmartFoxClient (Module: SmartFoxClient) Version: 1.2.4.0 (1.2.4.0)