C# Class Flood.Editor.Server.ProjectManager

Inheritance: IProjectManager
Exibir arquivo Open project: FloodProject/flood Class Usage Examples

Public Methods

Method 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

Method 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 method

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

CreateProject() public method

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
return Task

GetProject() public method

Returns project.
public GetProject ( System.Guid projectId ) : Task
projectId System.Guid
return Task

GetProjects() public method

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

GetUsers() public method

Returns all project users.
public GetUsers ( System.Guid projectId ) : Task>
projectId System.Guid
return Task>

ModifyUserPermissions() public method

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

ProjectManager() public method

public ProjectManager ( ) : System.Threading.Tasks
return System.Threading.Tasks

RemoveProject() public method

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

RemoveUserFromProject() public method

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