Resource

Resource class

Represents a resource in a project.

public class Resource : IEquatable<Resource>

Properties

Name Description
Assignments { get; } Gets a collection of resource assignments for this object.
AvailabilityPeriods { get; } Gets a the instance of the AvailabilityPeriodCollection class. The collection of periods during which a resource is available.
Baselines { get; } Gets a BaselineCollection instance for this object. The baseline values for a resource.
ExtendedAttributes { get; } Gets the values of an extended attribute.
virtual IsRoot { get; }
OutlineCode { get; } Gets an OutlineCodeCollection object. The value of an outline code.
ParentProject { get; } Gets parent project for this container.
Rates { get; } Gets a the instance of the RateCollection class for this object. The collection of periods and rates associated with each one.
TimephasedData { get; set; } Gets or sets an instance of TimephasedDataCollection class for this object.

Methods

Name Description
Delete() Deletes a resource and its assignments from project.
override Equals(object) Returns a value indicating whether this instance is equal to a specified object.
Equals(Resource) Returns a value indicating whether this instance is equal to a specified instance of the Resource class.
Get<T>(Key<T, RscKey>) Returns the value to which the property is mapped in this container.
override GetHashCode() Returns a hash code value for the instance of the Resource class.
GetTimephasedData(DateTime, DateTime) Returns TimephasedDataCollection for this object with TimephasedDatavalues within given start and end dates.
GetTimephasedData(DateTime, DateTime, TimephasedDataType) Returns an instance of the TimephasedDataCollection class for this object with the TimephasedData values within given start and end dates of specified TimephasedDataType.
Set(Key<DateTime, RscKey>, DateTime) Maps the specified property to the specified value in this container.
Set<T>(Key<T, RscKey>, T) Maps the specified property to the specified value in this container.
override ToString() Returns short string representation of the instance of the Resource class. The exact details of the representation are unspecified and subject to change.

Examples

Shows how to add project resources.

var project = new Project();

// Add resources
project.Resources.Add("Resource");

project.Save(OutDir + "CreateResources_out.xml", SaveFileFormat.Xml);

See Also