C# Класс Flood.Editor.Server.ProjectManager

Наследование: IProjectManager
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddUserToProject() публичный Метод

Adds user to project
public AddUserToProject ( System.Guid projectId, ProjectUser user ) : Task
projectId System.Guid
user Flood.Editor.Shared.ProjectUser
Результат Task

CreateProject() публичный Метод

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
Результат Task

GetProject() публичный Метод

Returns project.
public GetProject ( System.Guid projectId ) : Task
projectId System.Guid
Результат Task

GetProjects() публичный Метод

Read-only dictionary of all the projects.
public GetProjects ( ) : Project>>.Task
Результат Project>>.Task

GetUsers() публичный Метод

Returns all project users.
public GetUsers ( System.Guid projectId ) : Task>
projectId System.Guid
Результат Task>

ModifyUserPermissions() публичный Метод

Modifies user permissions.
public ModifyUserPermissions ( System.Guid projectId, ProjectUser user ) : Task
projectId System.Guid
user Flood.Editor.Shared.ProjectUser
Результат Task

ProjectManager() публичный Метод

public ProjectManager ( ) : System.Threading.Tasks
Результат System.Threading.Tasks

RemoveProject() публичный Метод

Removes an existing project.
Invokes the ProjectRemoved event.
public RemoveProject ( System.Guid id ) : Task
id System.Guid
Результат Task

RemoveUserFromProject() публичный Метод

Removes user from project
public RemoveUserFromProject ( System.Guid projectId, ProjectUser user ) : Task
projectId System.Guid
user Flood.Editor.Shared.ProjectUser
Результат Task