SmartFoxServer Silverlight API
LoadBuddyList Method
NamespacesSmartFoxClientAPISmartFoxClientLoadBuddyList()()()
Load the buddy list for the current user.
Declaration Syntax
C#Visual BasicVisual C++
public void LoadBuddyList()
Public Sub LoadBuddyList
public:
void LoadBuddyList()
Remarks

Sends:
SFSEvent..::.OnBuddyListDelegate
SFSEvent..::.OnBuddyListErrorDelegate

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to load the current user's buddy list.
CopyC#
SFSEvent.onBuddyList += OnBuddyList;

smartFox.LoadBuddyList();        

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

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

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