Class CustomFieldValueContainer
Provides access to a set of CustomFieldValue objects.
Inheritance
Inherited Members
Namespace: Moraware.JobTrackerAPI5
Assembly: JobTrackerAPI5.dll
Syntax
public class CustomFieldValueContainer : IEnumerable<CustomFieldValue>, IEnumerable
Methods
ContainsItemWithId(Int32)
Checks if an item with the given Id has already been added.
Declaration
public bool ContainsItemWithId(int id_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | id_ | Id to check for. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if there is an item for the given id_. |
Count()
Number of items.
Declaration
public int Count()
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of item's in the collection. |
GetEnumerator()
Provides an iterator over the collection members.
Declaration
public IEnumerator<CustomFieldValue> GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<CustomFieldValue> | An iterator over the collection members. |
Remarks
This method is present primarily to support the For ... Each syntax.
GetFieldValue(Int32)
Returns the string value of the given custom field. If the field is not in the collection, an empty string is returned.
Declaration
public string GetFieldValue(int customFieldTypeId_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | customFieldTypeId_ | Field to look up. |
Returns
| Type | Description |
|---|---|
| System.String | String value of the field. |
GetFieldValue(String)
Returns the string value of the given custom field. If the field is not in the collection, an empty string is returned.
Declaration
public string GetFieldValue(string customFieldName_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | customFieldName_ | Name of the field to look up. |
Returns
| Type | Description |
|---|---|
| System.String | String value of the field. |
Item(Int32)
Looks up the item with the given customFieldTypeId_.
Declaration
public CustomFieldValue Item(int customFieldTypeId_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | customFieldTypeId_ | Id of the item to search for. |
Returns
| Type | Description |
|---|---|
| CustomFieldValue | The item with the given id. |
Item(String, Boolean)
Looks up the item with the given name.
Declaration
public CustomFieldValue Item(string customFieldName_, bool exceptionIfNotThere_ = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | customFieldName_ | Name of CustomField to search for. |
| System.Boolean | exceptionIfNotThere_ | If True and no such CustomField name is found, an exception will be thrown. |
Returns
| Type | Description |
|---|---|
| CustomFieldValue | The CustomFieldValue with the given name. |
ItemAt(Int32)
Returns the item at the given index.
Declaration
public CustomFieldValue ItemAt(int zeroBasedIndex_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | zeroBasedIndex_ | Index to retrieve. |
Returns
| Type | Description |
|---|---|
| CustomFieldValue | The indicated item. |
SetFieldValue(Int32, String)
Sets the value of a custom field.
Declaration
public void SetFieldValue(int customFieldTypeId_, string fieldValue_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | customFieldTypeId_ | Field to be set. |
| System.String | fieldValue_ | Value to use. |
SetFieldValueId(Int32, Nullable<Int32>)
Sets the value of a custom field.
Declaration
public void SetFieldValueId(int customFieldTypeId_, int? fieldValueId_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | customFieldTypeId_ | Field to be set. |
| System.Nullable<System.Int32> | fieldValueId_ | Value to use. |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Provides a strongly typed iterator over the collection members.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator | A strongly typed iterator over the collection members. |
Remarks
This method is present primarily to support the For ... Each syntax.