Combu  3.2.2
Unity API Documentation
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Combu.UserGroup Class Reference

Public Member Functions

 UserGroup ()
 Initializes a new instance of the UserGroup class. More...
 
 UserGroup (string jsonString)
 Initializes a new instance of the UserGroup class. More...
 
 UserGroup (Hashtable hash)
 Initializes a new instance of the UserGroup class. More...
 
virtual void FromJson (string jsonString)
 Initialize the object from a JSON formatted string. More...
 
virtual void FromHashtable (Hashtable hash)
 Initialize the object from a hashtable. More...
 
virtual void Save (System.Action< bool, string > callback)
 Save this instance. More...
 
virtual void Delete (System.Action< bool, string > callback)
 Delete this instance. More...
 
virtual void Join (System.Action< bool, string > callback)
 Join the local user to this group. More...
 
virtual void Join (long[] idUsers, System.Action< bool, string > callback)
 Join the specified idUsers to this group. More...
 
virtual void Join (string[] usernames, System.Action< bool, string > callback)
 Join the specified usernames to this group. More...
 
virtual void Leave (System.Action< bool, string > callback)
 Leave the local user from this group. More...
 
virtual void Leave (long[] idUsers, System.Action< bool, string > callback)
 Leave the specified idUsers from this group. More...
 
virtual void Leave (string[] usernames, System.Action< bool, string > callback)
 Leave the specified usernames from this group. More...
 

Static Public Member Functions

static void Load (long idOwner, System.Action< UserGroup[], string > callback)
 
static void Load (string usernameOwner, System.Action< UserGroup[], string > callback)
 
static void LoadMembership (long idMember, System.Action< UserGroup[], string > callback)
 
static void LoadMembership (string usernameMember, System.Action< UserGroup[], string > callback)
 
static void Load (string groupName, int pageNumber, int limit, System.Action< UserGroup[], int, int, string > callback)
 

Public Attributes

long id = 0
 
string name
 
long idOwner
 
User owner
 
Hashtable customData = new Hashtable()
 
User[] users = new User[0]
 

Protected Member Functions

virtual void Join< T > (long[] idUsers, string[] usernames, System.Action< bool, string > callback)
 Join the specified idUsers/usernames to this group. More...
 
virtual void Leave< T > (long[] idUsers, string[] usernames, System.Action< bool, string > callback)
 Leave the specified idUsers/usernames from this group. More...
 

Constructor & Destructor Documentation

◆ UserGroup() [1/3]

Combu.UserGroup.UserGroup ( )

Initializes a new instance of the UserGroup class.

◆ UserGroup() [2/3]

Combu.UserGroup.UserGroup ( string  jsonString)

Initializes a new instance of the UserGroup class.

Parameters
jsonStringJson string.

◆ UserGroup() [3/3]

Combu.UserGroup.UserGroup ( Hashtable  hash)

Initializes a new instance of the UserGroup class.

Parameters
hashHash.

Member Function Documentation

◆ Delete()

virtual void Combu.UserGroup.Delete ( System.Action< bool, string >  callback)
virtual

Delete this instance.

◆ FromHashtable()

virtual void Combu.UserGroup.FromHashtable ( Hashtable  hash)
virtual

Initialize the object from a hashtable.

Parameters
hashHash.

◆ FromJson()

virtual void Combu.UserGroup.FromJson ( string  jsonString)
virtual

Initialize the object from a JSON formatted string.

Parameters
jsonStringJson string.

◆ Join() [1/3]

virtual void Combu.UserGroup.Join ( long[]  idUsers,
System.Action< bool, string >  callback 
)
virtual

Join the specified idUsers to this group.

Parameters
idUsersIdentifier users.
callbackCallback.

◆ Join() [2/3]

virtual void Combu.UserGroup.Join ( string[]  usernames,
System.Action< bool, string >  callback 
)
virtual

Join the specified usernames to this group.

Parameters
usernamesUsernames.
callbackCallback.

◆ Join() [3/3]

virtual void Combu.UserGroup.Join ( System.Action< bool, string >  callback)
virtual

Join the local user to this group.

Parameters
callbackCallback.

◆ Join< T >()

virtual void Combu.UserGroup.Join< T > ( long[]  idUsers,
string[]  usernames,
System.Action< bool, string >  callback 
)
protectedvirtual

Join the specified idUsers/usernames to this group.

Parameters
idUsersIdentifier users.
usernamesUsernames.
callbackCallback.
Template Parameters
TType for UserGroup records.
Type Constraints
T :UserGroup 
T :new() 

◆ Leave() [1/3]

virtual void Combu.UserGroup.Leave ( long[]  idUsers,
System.Action< bool, string >  callback 
)
virtual

Leave the specified idUsers from this group.

Parameters
idUsersIdentifier users.
callbackCallback.

◆ Leave() [2/3]

virtual void Combu.UserGroup.Leave ( string[]  usernames,
System.Action< bool, string >  callback 
)
virtual

Leave the specified usernames from this group.

Parameters
usernamesUsernames.
callbackCallback.

◆ Leave() [3/3]

virtual void Combu.UserGroup.Leave ( System.Action< bool, string >  callback)
virtual

Leave the local user from this group.

Parameters
callbackCallback.

◆ Leave< T >()

virtual void Combu.UserGroup.Leave< T > ( long[]  idUsers,
string[]  usernames,
System.Action< bool, string >  callback 
)
protectedvirtual

Leave the specified idUsers/usernames from this group.

Parameters
idUsersIdentifier users.
usernamesUsernames.
callbackCallback.
Template Parameters
TType for UserGroup records.
Type Constraints
T :UserGroup 
T :new() 

◆ Save()

virtual void Combu.UserGroup.Save ( System.Action< bool, string >  callback)
virtual

Save this instance.