EntityCollection.ResourceEntity property

Gets 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)

Syntax

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

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

Property value

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

Remarks

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

Examples

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

Reference

EntityCollection class

EntityCollection members

Microsoft.Office.Project.Server.Library namespace