EntityCollection.ProjectEntity Property

Contains metadata for the project entity type.

Namespace:  Microsoft.Office.Project.Server.Library
Assembly:  Microsoft.Office.Project.Server.Library (in Microsoft.Office.Project.Server.Library.dll)

Syntax

'Declaration
Public ReadOnly Property ProjectEntity As Entity
    Get
'Usage
Dim instance As EntityCollection
Dim value As Entity

value = instance.ProjectEntity
public Entity ProjectEntity { get; }

Property Value

Type: Microsoft.Office.Project.Server.Library.Entity

Remarks

Use EntityCollection.Entities.ProjectEntity.UniqueId to obtain the GUID of the project entity for use in PSI methods.

Examples

The following code fragment uses the project entity GUID in order to get all of the project custom fields with the ReadCustomFieldsByEntity method. WebSvcCustomFields is the arbitrary name of a reference to the CustomFields.asmx Web service.

using PSLibrary = Microsoft.Office.Project.Server.Library;
. . .
public static WebSvcCustomFields.CustomFields customFields =
    new WebSvcCustomFields.CustomFields();
. . .
string projectEntity = PSLibrary.EntityCollection.Entities.ProjectEntity.UniqueId;

WebSvcCustomFields.CustomFieldDataSet cfDs = customFields.ReadCustomFieldsByEntity(
    new Guid(projectEntity));
. . .

See Also

Reference

EntityCollection Class

EntityCollection Members

Microsoft.Office.Project.Server.Library Namespace