Represents a collection of Resource objects.
More...
#include <ResourceCollection.h>
Inherits System::Collections::Generic::IList< typename >.
|
| int32_t | get_Count () const override |
| | Gets the number of elements contained in the ResourceCollection. More...
|
| |
| System::SharedPtr< Project > | get_ParentProject () const |
| | Gets the parent project of the ResourceCollection object. More...
|
| |
| System::SharedPtr< Resource > | idx_get (int32_t index) const override |
| | Returns the element at the specified index. More...
|
| |
| void | idx_set (int32_t index, System::SharedPtr< Resource > value) override |
| | Returns the element at the specified index. More...
|
| |
| System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Resource > > > | GetEnumerator () override |
| | Returns an enumerator for this collection. More...
|
| |
| System::SharedPtr< Resource > | Add () |
| | Adds new resource at the last position of a project resources collection. More...
|
| |
| System::SharedPtr< Resource > | Add (const System::String &resourceName) |
| | Adds new resource at the last position of a project resources collection. More...
|
| |
| System::SharedPtr< Resource > | Add (const System::String &resourceName, int32_t beforeResourceId) |
| | Adds new resource at the specified position of a project resources collection. More...
|
| |
| System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Resource > > > | ToList () |
| | Converts the ResourceCollection object to a list of Resource objects. More...
|
| |
| System::SharedPtr< Resource > | GetById (int32_t id) |
| | Returns a resource with the specified id. More...
|
| |
| System::SharedPtr< Resource > | GetByUid (int32_t uid) |
| | Returns a resource with the specified Uid. More...
|
| |
| void | Clear () override |
| | Direct clearing is not supported, this method just throw NotSupportedException. More...
|
| |
| bool | Remove (const System::SharedPtr< Resource > &item) override |
| | This is the stub implementation of ICollection's Remove method, that only throws NotSupportedException More...
|
| |
Represents a collection of Resource objects.
◆ Add() [1/3]
| System::SharedPtr<Resource> Aspose::Tasks::ResourceCollection::Add |
( |
| ) |
|
Adds new resource at the last position of a project resources collection.
- Returns
- Added resource.
◆ Add() [2/3]
| System::SharedPtr<Resource> Aspose::Tasks::ResourceCollection::Add |
( |
const System::String & |
resourceName | ) |
|
Adds new resource at the last position of a project resources collection.
- Parameters
-
| resourceName | Name of a resource. |
- Returns
- Added resource.
◆ Add() [3/3]
| System::SharedPtr<Resource> Aspose::Tasks::ResourceCollection::Add |
( |
const System::String & |
resourceName, |
|
|
int32_t |
beforeResourceId |
|
) |
| |
Adds new resource at the specified position of a project resources collection.
- Parameters
-
| resourceName | Name of a resource. |
| beforeResourceId | Position of the previous resource in a project resources collection. |
- Returns
- Added resource.
◆ Clear()
| void Aspose::Tasks::ResourceCollection::Clear |
( |
| ) |
|
|
override |
Direct clearing is not supported, this method just throw NotSupportedException.
◆ get_Count()
| int32_t Aspose::Tasks::ResourceCollection::get_Count |
( |
| ) |
const |
|
override |
◆ get_ParentProject()
| System::SharedPtr<Project> Aspose::Tasks::ResourceCollection::get_ParentProject |
( |
| ) |
const |
◆ GetById()
| System::SharedPtr<Resource> Aspose::Tasks::ResourceCollection::GetById |
( |
int32_t |
id | ) |
|
Returns a resource with the specified id.
- Parameters
-
O(1) complexity.
- Returns
- Resource with the specified id if present; otherwise, null.
◆ GetByUid()
| System::SharedPtr<Resource> Aspose::Tasks::ResourceCollection::GetByUid |
( |
int32_t |
uid | ) |
|
Returns a resource with the specified Uid.
- Parameters
-
O(1) complexity.
- Returns
- Resource with the specified uid if present; otherwise, null.
◆ GetEnumerator()
| System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<Resource> > > Aspose::Tasks::ResourceCollection::GetEnumerator |
( |
| ) |
|
|
override |
Returns an enumerator for this collection.
- Returns
- an enumerator for this collection.
◆ idx_get()
| System::SharedPtr<Resource> Aspose::Tasks::ResourceCollection::idx_get |
( |
int32_t |
index | ) |
const |
|
override |
Returns the element at the specified index.
- Parameters
-
| index | The zero-based index of the element to get. |
- Returns
- the element at the specified index.
◆ idx_set()
| void Aspose::Tasks::ResourceCollection::idx_set |
( |
int32_t |
index, |
|
|
System::SharedPtr< Resource > |
value |
|
) |
| |
|
override |
Returns the element at the specified index.
- Parameters
-
| index | The zero-based index of the element to get. |
| value | the element at the specified index. |
◆ Remove()
| bool Aspose::Tasks::ResourceCollection::Remove |
( |
const System::SharedPtr< Resource > & |
item | ) |
|
|
override |
This is the stub implementation of ICollection's Remove method, that only throws NotSupportedException
- Parameters
-
- Returns
true if the item was removed; false otherwise.
◆ ToList()
| System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Resource> > > Aspose::Tasks::ResourceCollection::ToList |
( |
| ) |
|