November Happy Hour will be moved to Thursday December 5th.

Class ScriptSettingItemCollection

A collection of ScriptSettingItems with built-in storing and restoring of items to and from view state.

Inheritance
System.Object
ScriptSettingItemCollection
Implements
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
Namespace: EPiServer.ClientScript.WebControls
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class ScriptSettingItemCollection : StateManagedCollection, IList, ICollection, IEnumerable

Constructors

ScriptSettingItemCollection()

Declaration
public ScriptSettingItemCollection()

Properties

IsReadOnly

Returns a value indicating whether the collection is read only

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean

Item[Int32]

Gets or sets the element at the specified index.

Declaration
public ScriptSettingItem this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index

The zero-based index of the element to get or set.

Property Value
Type Description
ScriptSettingItem

The element at the specified index.

Methods

Add(ScriptSettingItem)

Add an item to the collection

Declaration
public int Add(ScriptSettingItem item)
Parameters
Type Name Description
ScriptSettingItem item
Returns
Type Description
System.Int32

The position where the item was inserted

Contains(ScriptSettingItem)

Returns tru if the collection contains the specific item.

Declaration
public bool Contains(ScriptSettingItem item)
Parameters
Type Name Description
ScriptSettingItem item

Item to look for

Returns
Type Description
System.Boolean

CopyTo(ScriptSettingItem[], Int32)

Copies the collection to an array

Declaration
public void CopyTo(ScriptSettingItem[] array, int arrayIndex)
Parameters
Type Name Description
ScriptSettingItem[] array

The System.Array used as destination.

System.Int32 arrayIndex

The start index in the array when copying

CreateKnownType(Int32)

Create an instance of known type for the collection

Declaration
protected override object CreateKnownType(int index)
Parameters
Type Name Description
System.Int32 index
Returns
Type Description
System.Object

GetKnownTypes()

Get an array of types recognized by this collection

Declaration
protected override Type[] GetKnownTypes()
Returns
Type Description
System.Type[]

An array of types

IndexOf(ScriptSettingItem)

Returns the zero-based index of an item in the collection

Declaration
public int IndexOf(ScriptSettingItem item)
Parameters
Type Name Description
ScriptSettingItem item

The item to look for

Returns
Type Description
System.Int32

Insert(Int32, ScriptSettingItem)

Insert an item in the collection

Declaration
public void Insert(int index, ScriptSettingItem item)
Parameters
Type Name Description
System.Int32 index

The zero-based index at which value should be inserted.

ScriptSettingItem item

The ScriptSettingItem to insert in the collection

OnValidate(Object)

Validates that items added are valid types for this collection. Throws an System.ArgumentException if the item are not recognized as a valid type.

Declaration
protected override void OnValidate(object o)
Parameters
Type Name Description
System.Object o

The added item.

Remove(ScriptSettingItem)

Remove a ScriptSettingItem from the collection

Declaration
public void Remove(ScriptSettingItem item)
Parameters
Type Name Description
ScriptSettingItem item

RemoveAt(Int32)

Remove an item at the specified index from the collection.

Declaration
public void RemoveAt(int index)
Parameters
Type Name Description
System.Int32 index

SetDirtyObject(Object)

Set the viewstate of an object in the collection dirty

Declaration
protected override void SetDirtyObject(object o)
Parameters
Type Name Description
System.Object o

Implements

System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable

Extension Methods