EntityCollection.ResourceEntity Property

Contains metadata for the resource entity type.

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


Public ReadOnly Property ResourceEntity As Entity
Dim instance As EntityCollection
Dim value As Entity

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

Property Value

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


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


The following code fragment uses the resource entity GUID in order to get all of the resource 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 resourceEntity = PSLibrary.EntityCollection.Entities.ResourceEntity.UniqueId;

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

See Also


EntityCollection Class

EntityCollection Members

Microsoft.Office.Project.Server.Library Namespace