EnterpriseResourceCollection class
inherits members from ClientObjectCollection
Represents a collection of EnterpriseResource objects.
Syntax
CSOM
class EnterpriseResourceCollection
JSOM
PS.EnterpriseResourceCollection
REST Interface
Supported.
PS.EnterpriseResourceCollection
http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/EnterpriseResources
Members
✓ - Read Support ✓ʷ - Write Support
Properties
Name | .NET | JSOM | REST | Type | Description |
---|---|---|---|---|---|
[Integer] | ✓ | EnterpriseResource | Gets a EnterpriseResource from the collection at the specified index. | ||
Item | ✓ | EnterpriseResource | Gets a EnterpriseResource from the collection at the specified index. | ||
Self | ✓ | EnterpriseResource | Gets the enterprise resource object for the current user. |
Methods
Name | .NET | JSOM | REST | Return Type | Description |
---|---|---|---|---|---|
'{EnterpriseResourceId}' | ✓ | EnterpriseResource | Gets a EnterpriseResource from the collection with the specified EnterpriseResourceId. | ||
Add(EnterpriseResourceCreationInformation parameters) | ✓ | ✓ | ✓ | EnterpriseResource | Adds the EnterpriseResource that is specified by the EnterpriseResourceCreationInformation object to the collection. |
GetByGuid(Guid uid) | ✓ | ✓ | ✓ | EnterpriseResource | Gets a EnterpriseResource from the collection with the Guid value. |
GetById(String objectId) | ✓ | ✓ | ✓ | EnterpriseResource | Gets a EnterpriseResource from the collection with the Id value. |
GetByUser(SPUser user) | ✓ | ✓ | ✓ | EnterpriseResource | Returns an element from the collection linked to the SharePoint user. |
Remove(EnterpriseResource resource) | ✓ | ✓ | Boolean | Removes the specified EnterpriseResource from the collection. | |
Update() | ✓ | ✓ | void | Updates the enterprise resource collection. |
#### Method Details
'{EnterpriseResourceId}'
Gets a EnterpriseResource from the collection with the specified EnterpriseResourceId.
Syntax
EnterpriseResource http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/EnterpriseResources('{EnterpriseResourceId}')
Parameters
Name | Type | Description |
---|---|---|
EnterpriseResourceId | String | the id of the EnterpriseResource |
Return Value
Add(EnterpriseResourceCreationInformation parameters)
Adds the EnterpriseResource that is specified by the EnterpriseResourceCreationInformation object to the collection.
Syntax
EnterpriseResource Add(EnterpriseResourceCreationInformation parameters)
Parameters
Name | Type | Description |
---|---|---|
parameters | EnterpriseResourceCreationInformation | The properties that can be set when creating a enterprise resource. |
Return Value
GetByGuid(Guid uid)
Gets a EnterpriseResource from the collection with the Id value.
Syntax
EnterpriseResource GetByGuid(Guid uid)
Parameters
Name | Type | Description |
---|---|---|
uid | Guid | The Guid of the EnterpriseResource |
Return Value
GetById(String objectId)
Gets a EnterpriseResource from the collection with the Guid value.
Syntax
EnterpriseResource GetById(String objectId)
Parameters
Name | Type | Description |
---|---|---|
objectId | String | The id of the EnterpriseResource. |
Return Value
GetByUser(SPUser user)
Returns an element from the collection linked to the SharePoint user.
Syntax
EnterpriseResource GetByUser(SPUser user)
Parameters
Name | Type | Description |
---|---|---|
user | SPUser | An object of type User. |
Return Value
Remove(EnterpriseResource resource)
Removes the specified EnterpriseResource from the collection.
Syntax
Boolean Remove(EnterpriseResource resource)
Parameters
Name | Type | Description |
---|---|---|
resource | EnterpriseResource | The EnterpriseResource to remove. |
Return Value
Boolean True if the object is removed from the collection; otherwise, False.
Self()
Gets the current enterprise resource from the collection.
Syntax
Self()
Parameters
none
Return Value
EnterpriseResource
An EnterpriseResource object.
Update()
Updates the enterprise resource collection.
Syntax
void Update()
Parameters
None
Return Value
void
See Also
EnterpriseResource
EnterpriseResourceCreationInformation
ProjectContext
SPUser