C# Class Mckineap.Models.Context.Projects.ProjectFactory

ProjectFactory class
Wraps Project creation with automated fields validation.
ファイルを表示 Open project: loic-lavergne/mckineap

Public Methods

Method Description
CreateProject ( string path, string name ) : Project
DeleteProject ( Project project ) : System.Boolean

Private Methods

Method Description
CheckPathIntegrity ( string path ) : System.Boolean

Returns true if the Project's path exists and has read/write permissions, otherwise returns false TODO: Check path IO Permissions and return appropriate errors

CreateProjectWorkspace ( string path, string name ) : System.Boolean

Creates a new directory for the project.

DirectoryHasPermission ( string directory ) : System.Boolean

Returns true if there are reading and writing permissions on the directory

FieldIsValid ( string field ) : System.Boolean

Returns true if the field is valid. A valid field is neither NULL nor empty.

FolderIsAvailable ( string folder ) : System.Boolean

Returns true if the Project's folder doesn't exist, otherwise returns false

ProjectFactory ( ) : System
WriteProjectConfigurationFile ( string path, string name ) : System.Boolean

Creates a new Project configuration file.
Writes into the Project configuration file the default configuration parameters.

Method Details

CreateProject() public static method

public static CreateProject ( string path, string name ) : Project
path string
name string
return Project

DeleteProject() public static method

public static DeleteProject ( Project project ) : System.Boolean
project Project
return System.Boolean