C# Class afung.MangaWeb3.Server.CollectionUser

The CollectionUser class
显示文件 Open project: a-fung/MangaWeb3 Class Usage Examples

Public Methods

Method Description
CreateNew ( Collection collection, User user, bool access ) : CollectionUser

Create a new CollectionUser object

DeleteRelations ( int t, int id, int ids ) : void
Get ( Collection collection, User user ) : CollectionUser
GetByCollection ( Collection collection ) : afung.MangaWeb3.Server.CollectionUser[]

Get all CollectionUser objects associated to a collection

GetByUser ( User user ) : afung.MangaWeb3.Server.CollectionUser[]

Get all CollectionUser objects associated to a user

Save ( ) : void
SetRelationsAcess ( int t, int id, int ids, bool access ) : void
ToJson ( ) : CollectionUserJson
ToJsonArray ( CollectionUser cus ) : afung.MangaWeb3.Common.CollectionUserJson[]

Private Methods

Method Description
CollectionUser ( ) : System

Instantiate a new instance of CollectionUser class

FromData ( object>.Dictionary data ) : CollectionUser

Create a new instance of CollectionUser using data from database

GetMultiple ( string where ) : afung.MangaWeb3.Server.CollectionUser[]

Method Details

CreateNew() public static method

Create a new CollectionUser object
public static CreateNew ( Collection collection, User user, bool access ) : CollectionUser
collection Collection The collection
user User The user
access bool Allow/deny access
return CollectionUser

DeleteRelations() public static method

public static DeleteRelations ( int t, int id, int ids ) : void
t int
id int
ids int
return void

Get() public static method

public static Get ( Collection collection, User user ) : CollectionUser
collection Collection
user User
return CollectionUser

GetByCollection() public static method

Get all CollectionUser objects associated to a collection
public static GetByCollection ( Collection collection ) : afung.MangaWeb3.Server.CollectionUser[]
collection Collection The collection
return afung.MangaWeb3.Server.CollectionUser[]

GetByUser() public static method

Get all CollectionUser objects associated to a user
public static GetByUser ( User user ) : afung.MangaWeb3.Server.CollectionUser[]
user User The user
return afung.MangaWeb3.Server.CollectionUser[]

Save() public method

public Save ( ) : void
return void

SetRelationsAcess() public static method

public static SetRelationsAcess ( int t, int id, int ids, bool access ) : void
t int
id int
ids int
access bool
return void

ToJson() public method

public ToJson ( ) : CollectionUserJson
return afung.MangaWeb3.Common.CollectionUserJson

ToJsonArray() public static method

public static ToJsonArray ( CollectionUser cus ) : afung.MangaWeb3.Common.CollectionUserJson[]
cus CollectionUser
return afung.MangaWeb3.Common.CollectionUserJson[]