C# Class afung.MangaWeb3.Server.Collection

The Collection class
Afficher le fichier Open project: a-fung/MangaWeb3 Class Usage Examples

Méthodes publiques

Méthode Description
Accessible ( AjaxBase ajax ) : bool

Get whether the current request can access the collection

CheckNewCollectionName ( string name ) : bool

Check whether a name can be used for creating a new collection

CheckNewCollectionPath ( string path ) : string

Check whether a path can be used for creating a new collection

CreateNewCollection ( string name, string path, bool public_, bool autoadd ) : Collection

Create a new collection

DeleteCollections ( int ids ) : void

Delete collections and all associated data from database

GetAccessible ( AjaxBase ajax ) : afung.MangaWeb3.Server.Collection[]

Get a list of collections from database which is accessible by the current user

GetAllCollectionNames ( ) : string[]

Get the names of all the collections from database

GetAllCollections ( ) : afung.MangaWeb3.Server.Collection[]

Get all collections from database

GetAutoAdd ( ) : afung.MangaWeb3.Server.Collection[]

Get a list of collections from database which uses auto add

GetById ( int id ) : Collection

Get a collection from database by ID

GetByName ( string name ) : Collection

Get a collection from database by name

MarkFolderCacheDirty ( ) : void

Mark Folder Cache Dirty

ProcessFolderCache ( ) : void

Process folder cache and save it in database

Save ( ) : void

Save the collection to database

SetCollectionsPublic ( int ids, bool public_ ) : void

Set collections to be public/private

ToJson ( ) : CollectionJson

Get an object to be stringified and passed to client app

ToJsonArray ( Collection collections ) : afung.MangaWeb3.Common.CollectionJson[]

Get an array of CollectionJson to be passed to client app

Private Methods

Méthode Description
Collection ( ) : System

Instantiate a new instance of Collection class

FromData ( object>.Dictionary data ) : Collection

Create a new instance of Collection using data from database

Method Details

Accessible() public méthode

Get whether the current request can access the collection
public Accessible ( AjaxBase ajax ) : bool
ajax AjaxBase The AjaxBase object which received the request
Résultat bool

CheckNewCollectionName() public static méthode

Check whether a name can be used for creating a new collection
public static CheckNewCollectionName ( string name ) : bool
name string The name
Résultat bool

CheckNewCollectionPath() public static méthode

Check whether a path can be used for creating a new collection
public static CheckNewCollectionPath ( string path ) : string
path string
Résultat string

CreateNewCollection() public static méthode

Create a new collection
public static CreateNewCollection ( string name, string path, bool public_, bool autoadd ) : Collection
name string The collection name
path string The collection path
public_ bool Whether the collection is public
autoadd bool Whether the collection uses auto add
Résultat Collection

DeleteCollections() public static méthode

Delete collections and all associated data from database
public static DeleteCollections ( int ids ) : void
ids int A list of collection IDs
Résultat void

GetAccessible() public static méthode

Get a list of collections from database which is accessible by the current user
public static GetAccessible ( AjaxBase ajax ) : afung.MangaWeb3.Server.Collection[]
ajax AjaxBase The AjaxBase object which received the request
Résultat afung.MangaWeb3.Server.Collection[]

GetAllCollectionNames() public static méthode

Get the names of all the collections from database
public static GetAllCollectionNames ( ) : string[]
Résultat string[]

GetAllCollections() public static méthode

Get all collections from database
public static GetAllCollections ( ) : afung.MangaWeb3.Server.Collection[]
Résultat afung.MangaWeb3.Server.Collection[]

GetAutoAdd() public static méthode

Get a list of collections from database which uses auto add
public static GetAutoAdd ( ) : afung.MangaWeb3.Server.Collection[]
Résultat afung.MangaWeb3.Server.Collection[]

GetById() public static méthode

Get a collection from database by ID
public static GetById ( int id ) : Collection
id int
Résultat Collection

GetByName() public static méthode

Get a collection from database by name
public static GetByName ( string name ) : Collection
name string The name
Résultat Collection

MarkFolderCacheDirty() public méthode

Mark Folder Cache Dirty
public MarkFolderCacheDirty ( ) : void
Résultat void

ProcessFolderCache() public méthode

Process folder cache and save it in database
public ProcessFolderCache ( ) : void
Résultat void

Save() public méthode

Save the collection to database
public Save ( ) : void
Résultat void

SetCollectionsPublic() public static méthode

Set collections to be public/private
public static SetCollectionsPublic ( int ids, bool public_ ) : void
ids int A list of collection IDs
public_ bool Whether is public or private
Résultat void

ToJson() public méthode

Get an object to be stringified and passed to client app
public ToJson ( ) : CollectionJson
Résultat afung.MangaWeb3.Common.CollectionJson

ToJsonArray() public static méthode

Get an array of CollectionJson to be passed to client app
public static ToJsonArray ( Collection collections ) : afung.MangaWeb3.Common.CollectionJson[]
collections Collection An array of collections
Résultat afung.MangaWeb3.Common.CollectionJson[]