C# Class Flood.Editor.Server.ProjectManager

Inheritance: IProjectManager
Afficher le fichier Open project: FloodProject/flood Class Usage Examples

Méthodes publiques

Méthode Description
AddUserToProject ( System.Guid projectId, ProjectUser user ) : Task

Adds user to project

CreateProject ( ProjectType type, string name, Owner founder ) : Task

Creates a new project of the given type and name and adds it to the list.

GetProject ( System.Guid projectId ) : Task

Returns project.

GetProjects ( ) : Project>>.Task

Read-only dictionary of all the projects.

GetUsers ( System.Guid projectId ) : Task>

Returns all project users.

ModifyUserPermissions ( System.Guid projectId, ProjectUser user ) : Task

Modifies user permissions.

ProjectManager ( ) : System.Threading.Tasks
RemoveProject ( System.Guid id ) : Task

Removes an existing project.

Invokes the ProjectRemoved event.

RemoveUserFromProject ( System.Guid projectId, ProjectUser user ) : Task

Removes user from project

Private Methods

Méthode Description
AddProject ( Project project ) : void

Adds a new project.

Invokes the ProjectAdded event.

LoadProjectsFromDatabase ( ) : void

Loads all projects stored in the databse

StartTimer ( ) : void

Start timer function

TimerEvent ( object sender, System.Timers.ElapsedEventArgs e ) : void

Timer callback to saves changes to the database permanently

UpdateDatabase ( Project proj ) : void

Store modified project in the database

Method Details

AddUserToProject() public méthode

Adds user to project
public AddUserToProject ( System.Guid projectId, ProjectUser user ) : Task
projectId System.Guid
user Flood.Editor.Shared.ProjectUser
Résultat Task

CreateProject() public méthode

Creates a new project of the given type and name and adds it to the list.
public CreateProject ( ProjectType type, string name, Owner founder ) : Task
type ProjectType
name string
founder Flood.Editor.Shared.Owner
Résultat Task

GetProject() public méthode

Returns project.
public GetProject ( System.Guid projectId ) : Task
projectId System.Guid
Résultat Task

GetProjects() public méthode

Read-only dictionary of all the projects.
public GetProjects ( ) : Project>>.Task
Résultat Project>>.Task

GetUsers() public méthode

Returns all project users.
public GetUsers ( System.Guid projectId ) : Task>
projectId System.Guid
Résultat Task>

ModifyUserPermissions() public méthode

Modifies user permissions.
public ModifyUserPermissions ( System.Guid projectId, ProjectUser user ) : Task
projectId System.Guid
user Flood.Editor.Shared.ProjectUser
Résultat Task

ProjectManager() public méthode

public ProjectManager ( ) : System.Threading.Tasks
Résultat System.Threading.Tasks

RemoveProject() public méthode

Removes an existing project.
Invokes the ProjectRemoved event.
public RemoveProject ( System.Guid id ) : Task
id System.Guid
Résultat Task

RemoveUserFromProject() public méthode

Removes user from project
public RemoveUserFromProject ( System.Guid projectId, ProjectUser user ) : Task
projectId System.Guid
user Flood.Editor.Shared.ProjectUser
Résultat Task