EntityCollection.TaskEntity Property
Contains metadata for the task 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 TaskEntity As Entity
Get
'Usage
Dim instance As EntityCollection
Dim value As Entity
value = instance.TaskEntity
public Entity TaskEntity { get; }
Property Value
Type: Microsoft.Office.Project.Server.Library.Entity
Remarks
Use EntityCollection.Entities.TaskEntity.UniqueId to obtain the GUID of the task entity for use in PSI methods.
Examples
The following code fragment uses the task entity GUID in order to get all of the task custom fields with the ReadCustomFieldsByEntity method. [CustomFields Web service] 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 taskEntity = PSLibrary.EntityCollection.Entities.TaskEntity.UniqueId;
WebSvcCustomFields.CustomFieldDataSet cfDs = customFields.ReadCustomFieldsByEntity(
new Guid(taskEntity));
. . .