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)

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. [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 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