InitBuddyListRequest Class |
Namespace: Sfs2X.Requests.Buddylist
public class InitBuddyListRequest : BaseRequest
The InitBuddyListRequest type exposes the following members.
Name | Description | |
---|---|---|
InitBuddyListRequest |
Creates a new InitBuddyListRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSBuddyEvent.BUDDY_LIST_INIT, OnBuddyInited); sfs.AddEventListener(SFSBuddyEvent.BUDDY_ERROR, OnBuddyError); // Initialize the Buddy List system sfs.Send(new InitBuddyListRequest()); } void OnBuddyInited(BaseEvent evt) { Console.WriteLine("Buddy List system initialized successfully"); // .Net / Unity System.Diagnostics.Debug.WriteLine("Buddy List system initialized successfully"); // UWP // Retrieve my buddies list List<Buddy> buddies = sfs.BuddyManager.BuddyList; // Display the online buddies in a list component in the application interface ... } void OnBuddyError(BaseEvent evt) { Console.WriteLine("The following error occurred while executing a buddy-related request: " + (string)evt.Params["errorMessage"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("The following error occurred while executing a buddy-related request: " + (string)evt.Params["errorMessage"]); // UWP }