Search Results for

Show / Hide Table of Contents

# Class AttachmentItemCollection

Collection wrapper for legacy attachment items.

##### Inheritance

object
AttachmentItemCollection

##### Implements

ICollection
IEnumerable

##### Inherited Members

object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: CuteWebUI

###### Assembly: AjaxUploader.dll

##### Syntax

    public class AttachmentItemCollection : ICollection, IEnumerable

### Properties

#### Count

Gets the number of attachment items in the collection.

##### Declaration

    public int Count { get; }

##### Property Value

Type | Description
--- | ---
int |

#### IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).

##### Declaration

    public bool IsSynchronized { get; }

##### Property Value

Type | Description
--- | ---
bool | true if access to the ICollection is synchronized (thread safe); otherwise, false.

#### this[int]

Gets the attachment item at the specified index.

##### Declaration

    public AttachmentItem this[int index] { get; }

##### Parameters

Type | Name | Description
--- | --- | ---
int | index |

##### Property Value

Type | Description
--- | ---
AttachmentItem |

#### SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

##### Declaration

    public object SyncRoot { get; }

##### Property Value

Type | Description
--- | ---
object | An object that can be used to synchronize access to the ICollection.

### Methods

#### Add(int, string, Stream)

Adds an uploaded file stream to the attachment collection.

##### Declaration

    public void Add(int filesize, string filename, Stream stream)

##### Parameters

Type | Name | Description
--- | --- | ---
int | filesize |
string | filename |
Stream | stream |

#### CopyTo(Array, int)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

##### Declaration

    public void CopyTo(Array array, int index)

##### Parameters

Type | Name | Description
--- | --- | ---
Array | array | The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.
int | index | The zero-based index in `array` at which copying begins.

##### Exceptions

Type | Condition
--- | ---
ArgumentNullException | `array` is null.
ArgumentOutOfRangeException | `index` is less than zero.
ArgumentException | `array` is multidimensional. -or- The number of elements in the source ICollection is greater than the available space from `index` to the end of the destination `array`. -or- The type of the source ICollection cannot be cast automatically to the type of the destination `array`.

#### GetEnumerator()

Returns an enumerator that iterates through a collection.

##### Declaration

    public IEnumerator GetEnumerator()

##### Returns

Type | Description
--- | ---
IEnumerator | An IEnumerator object that can be used to iterate through the collection.

#### ToArray()

Returns the current attachment items as an array snapshot.

##### Declaration

    public AttachmentItem[] ToArray()

##### Returns

Type | Description
--- | ---
AttachmentItem[] |

### Implements

ICollection
IEnumerable