# ProjectResourceCollection

Project resources with typed creation helpers.

Class 

`OfficeIMO.Project`

**Namespace**

`OfficeIMO.Project`

**Assembly**

`OfficeIMO.Project`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[ProjectEntityCollections.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L39)

**Implements**

`IReadOnlyList<ProjectResource>` `IReadOnlyCollection<ProjectResource>` `IEnumerable<ProjectResource>` `IEnumerable`

**Modifiers**

sealed

**Attributes**

`DefaultMember("Item")`

Project resources with typed creation helpers.

## Inheritance

- object
- ProjectResourceCollection

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [ProjectDocument.Resources](/api/project/officeimo-project-projectdocument/#property-resources)

Filter members 

Show inherited

## Methods

`public ProjectResource AddCost(string name)` [#](#method-addcost-string)

[ProjectEntityCollections.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L43)

Creates a cost resource.

Parameters

**name string required**

Returns

`ProjectResource`

`public ProjectResource AddMaterial(string name)` [#](#method-addmaterial-string)

[ProjectEntityCollections.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L41)

Creates a material resource.

Parameters

**name string required**

Returns

`ProjectResource`

`public ProjectResource AddWork(string name)` [#](#method-addwork-string)

[ProjectEntityCollections.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L39)

Creates a work resource.

Parameters

**name string required**

Returns

`ProjectResource`

`public ProjectResource GetByUid(int uid)` [#](#method-getbyuid-int32)

[ProjectEntityCollections.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L52)

Finds a resource by stable UID.

Parameters

**uid int required**

Returns

`ProjectResource`

`public IEnumerator<ProjectResource> GetEnumerator()` [#](#method-getenumerator)

[ProjectEntityCollections.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L56)

Returns an enumerator that iterates through the collection.

Returns

`IEnumerator<ProjectResource>` An enumerator that can be used to iterate through the collection.

`public bool Remove(ProjectResource resource, ProjectRemovalMode mode = RejectIfReferenced)` [#](#method-remove-officeimo-project-projectresource-officeimo-project-projectremovalmode)

[ProjectEntityCollections.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L54)

Removes a resource, rejecting assignments unless cascade removal is explicit.

Parameters

**resource OfficeIMO.Project.ProjectResource required**

**mode OfficeIMO.Project.ProjectRemovalMode = RejectIfReferenced optional**

Returns

`bool`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public int Count { get; }` [#](#property-count)

[ProjectEntityCollections.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L35)

Number of resources.

`public ProjectResource this[int index] { get; }` [#](#property-item-int32)

[ProjectEntityCollections.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L37)

Resource by position.

Parameters

**index int required**

<!-- PowerForge markdown artifact sha256:CC9D3A76654AD900075CAC22B766F8D4CC0D88A130F15171933857DA3278B635 -->
