Ofcas.Lk.Api.Client - Version 3.0 3.0.0.112

Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Ofcas.Lk.Api.Client.Core.ProjectCenter Class Reference

ProjectCenter is the representation of a LogiKal project-center. The children are of type Project. The children can be received from the InfoList (CoreObjectWithChildren<TChild,TChildInfo>.ChildrenInfos). Each ProjectCenter belongs to a fixed directory. To use another project directory, create a new project center using method GetProjectCenter. More...

Inheritance diagram for Ofcas.Lk.Api.Client.Core.ProjectCenter:

## Public Member Functions
override Project | GetChild (ProjectInfo projectInfo)
| Gets a Project based on a ProjectInfo. More...
Project | GetProject (ProjectInfo projectInfo)
| This method is deprecated. Please use GetChild(ProjectInfo) instead. More...
ProjectCenter | GetProjectCenter (ProjectDirectoryInfo projectDirectoryInfo)
| Creates a new ProjectCenter for the given directory. Each ProjectCenter belongs to a fixed directory. More...
override OperationInfo | CanCreateChild ()
| Checks whether a project can be created or not. More...
override ProjectInfo | CreateChild ()
| Creates a new project with a default name. Call Project.Edit with WellKnownEditKeys.Project.Name to change the name after the creation. More...
override OperationInfo | CanDeleteChild (ProjectInfo projectInfo)
| Checks whether a project can be deleted or not. More...
override void | DeleteChild (ProjectInfo projectInfo)
| Deletes a project based on an info object. More...
override OperationInfo | CanMoveFrom (ICoreInfo coreInfo, bool deepCheck=true)
override ProjectInfo | MoveFrom (ICoreInfo coreInfo)
| Moves an object into this directory based on an info object. More...
override OperationInfo | CanCopyFrom (ICoreInfo coreInfo, bool deepCheck=true)
override ProjectInfo | CopyFrom (ICoreInfo coreInfo)
| Copies an object into this directory based on an info object. More...
ProjectInfo | CreateLkProject (string projectName)
| Creates a new Project in the LogiKal project structure. The project will be created in the current active directory. More...
Elevation | GetElevationFromLkId (Guid lkElevGuid)
  | Exceptions
  NotSupportedException |
ElevationInstance | GetElevationInstanceFromLkId (Guid lkElevInstanceGuid)
  | Exceptions
  NotSupportedException |
ProjectDirectoryInfo | CreateDirectory (string directoryName)
| Creates a new directory in the current project center. More...
OperationInfo | CanDeleteDirectory (string directoryName)
| Checks whether a directory can be deleted or not. More...
void | DeleteDirectory (string directoryName)
| Deletes the directory from the current project center. More...
OperationInfo | CanRename (string directoryName)
| Checks if the name of this project directory can be changed to the stated name. Renaming the root directory or the recyclebin is not possible. More...
ProjectDirectoryInfo | Rename (string directoryName)
| Changes the name of this project directory to the stated name. Renaming the root directory or the recyclebin is not possible. More...
override ProjectInfo | RefreshChild (ProjectInfo childInfo)
Public Member Functions inherited from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< LoginScope, ProjectCenterInfo, Project, ProjectInfo >
TOwnInfo | Refresh ()
virtual OperationInfo | CanEdit (string key, object value)
virtual TOwnInfo | Edit (string key, object value)

## Public Attributes
ProjectDirectoryInfo | OwnDirectoryInfo => _ownDirectoryInfo
| Returns the directory info for the project-center More...

## Protected Member Functions
override IEnumerable< ProjectInfo > | GetChildrenInfos ()
virtual Project | CreateNewInstance (Guid coreObjectId, ProjectInfo childInfo)
Protected Member Functions inherited from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< LoginScope, ProjectCenterInfo, Project, ProjectInfo >
| CoreObjectFullyQualified (IServiceFactory< IApiService > serviceFactory, Guid coreObjectId, TParent parent, TOwnInfo ownInfo)
| Creates a new instance of CoreObjectFullyQualified<TParent,TOwnInfo,TChild,TChildInfo> with the given parameters. More...

## Properties
IList< ProjectDirectoryInfo > | ProjectDirectoryInfos`[get]`
Properties inherited from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< LoginScope, ProjectCenterInfo, Project, ProjectInfo >
TParent | Parent`[get]`
TOwnInfo | Info`[get]`

## Detailed Description

ProjectCenter is the representation of a LogiKal project-center. The children are of type Project. The children can be received from the InfoList (CoreObjectWithChildren<TChild,TChildInfo>.ChildrenInfos). Each ProjectCenter belongs to a fixed directory. To use another project directory, create a new project center using method GetProjectCenter.

## Member Function Documentation

## ◆ CanCreateChild()

override OperationInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CanCreateChild | ( |  | ) |

Checks whether a project can be created or not.

Returns

## ◆ CanDeleteChild()

override OperationInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CanDeleteChild | ( | ProjectInfo | projectInfo | ) |

Checks whether a project can be deleted or not.

Parameters

  projectInfo | The info of the project to be deleted.

Returns

## ◆ CanDeleteDirectory()

OperationInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CanDeleteDirectory | ( | string | directoryName | ) |

Checks whether a directory can be deleted or not.

Parameters

  directoryName | The name of the directory to be deleted.

Returns

## ◆ CanRename()

OperationInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CanRename | ( | string | directoryName | ) |

Checks if the name of this project directory can be changed to the stated name. Renaming the root directory or the recyclebin is not possible.

Parameters

  directoryName | The new name of this project directory. Cannot contain any invalid chars defined by Path.GetInvalidFileNameChars.

Returns
  Returns an OperationStatus containing the information if this operation can be called.

## ◆ CopyFrom()

override ProjectInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CopyFrom | ( | ICoreInfo | coreInfo | ) |

Copies an object into this directory based on an info object.

Parameters

  coreInfo | The info of the object to be copied.

Returns
  Returns an info object of the copied / created project.

## ◆ CreateChild()

override ProjectInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CreateChild | ( |  | ) |

Creates a new project with a default name. Call Project.Edit with WellKnownEditKeys.Project.Name to change the name after the creation.

Returns
  Returns an info object of the created project.

## ◆ CreateDirectory()

ProjectDirectoryInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CreateDirectory | ( | string | directoryName | ) |

Creates a new directory in the current project center.

Parameters

  directoryName | The name of the directory to be created.

Returns
  Returns the ProjectDirectoryInfo for the directory.

Exceptions

  ArgumentNullException | Occurs if the directory name is null or empty.
  InvalidOperationException | Occurs if the directory could not be found after refresh.
  NotSupportedException | Occurs if the directory could not be found after refresh.

## ◆ CreateLkProject()

ProjectInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CreateLkProject | ( | string | projectName | ) |

Creates a new Project in the LogiKal project structure. The project will be created in the current active directory.

Parameters

  projectName | The name of the new project

Returns
  The ProjectInfo to the created project

Exceptions

  Exception | contains api error message

## ◆ DeleteChild()

override void Ofcas.Lk.Api.Client.Core.ProjectCenter.DeleteChild | ( | ProjectInfo | projectInfo | ) |

Deletes a project based on an info object.

Parameters

  projectInfo | Returns an info of the project to be deleted.

## ◆ DeleteDirectory()

void Ofcas.Lk.Api.Client.Core.ProjectCenter.DeleteDirectory | ( | string | directoryName | ) |

Deletes the directory from the current project center.

Parameters

  directoryName | The name of the directory to be deleted.

Exceptions

  ArgumentNullException | Occurs if the directory name is null or empty.

## ◆ GetChild()

override Project Ofcas.Lk.Api.Client.Core.ProjectCenter.GetChild | ( | ProjectInfo | projectInfo | ) |

Gets a Project based on a ProjectInfo.

Parameters

  projectInfo | The ProjectInfo of the Project to be returned.

Returns
  Returns a Project based on the given ProjectInfo.

## ◆ GetProject()

Project Ofcas.Lk.Api.Client.Core.ProjectCenter.GetProject | ( | ProjectInfo | projectInfo | ) |

This method is deprecated. Please use GetChild(ProjectInfo) instead.

## ◆ GetProjectCenter()

ProjectCenter Ofcas.Lk.Api.Client.Core.ProjectCenter.GetProjectCenter | ( | ProjectDirectoryInfo | projectDirectoryInfo | ) |

Creates a new ProjectCenter for the given directory. Each ProjectCenter belongs to a fixed directory.

Parameters

  projectDirectoryInfo | The project directory to use

Returns
  The new ProjectCenter

Exceptions

  Exception | if creating project-center failed (for example invalid directory)

## ◆ MoveFrom()

override ProjectInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.MoveFrom | ( | ICoreInfo | coreInfo | ) |

Moves an object into this directory based on an info object.

Parameters

  coreInfo | The info of the object to be moved.

Returns
  Returns an info object of the moved / created project.

## ◆ Rename()

ProjectDirectoryInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.Rename | ( | string | directoryName | ) |

Changes the name of this project directory to the stated name. Renaming the root directory or the recyclebin is not possible.

Parameters

  directoryName | The new name of this project directory. Cannot contain any invalid chars defined by Path.GetInvalidFileNameChars.

Returns
  Returns an updated info of this project directory.

## Member Data Documentation

## ◆ OwnDirectoryInfo

ProjectDirectoryInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.OwnDirectoryInfo => _ownDirectoryInfo

Returns the directory info for the project-center

The documentation for this class was generated from the following file:

- ProjectCenter.cs