Class SharedList<T>
An
Inheritance
Implements
Namespace: DotNetNuke.Collections.Internal
Assembly: DotNetNuke.dll
Syntax
public class SharedList<T> : IList<T>
Type Parameters
| Name | Description |
|---|---|
| T | The type of value in the list. |
Constructors
| Improve this Doc View SourceSharedList()
Initializes a new instance of the SharedList<T> class.
Declaration
public SharedList()
SharedList(ILockStrategy)
Initializes a new instance of the SharedList<T> class.
Declaration
public SharedList(ILockStrategy lockStrategy)
Parameters
| Type | Name | Description |
|---|---|---|
| ILockStrategy | lockStrategy | The locking strategy to use. |
SharedList(LockingStrategy)
Initializes a new instance of the SharedList<T> class.
Declaration
public SharedList(LockingStrategy strategy)
Parameters
| Type | Name | Description |
|---|---|---|
| LockingStrategy | strategy | The locking strategy to use. |
Properties
| Improve this Doc View SourceCount
An
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
IsReadOnly
An
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Item[Int32]
An
Declaration
public T this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index |
Property Value
| Type | Description |
|---|---|
| T |
Methods
| Improve this Doc View SourceAdd(T)
An
Declaration
public void Add(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item |
Clear()
An
Declaration
public void Clear()
Contains(T)
An
Declaration
public bool Contains(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item |
Returns
| Type | Description |
|---|---|
| System.Boolean |
CopyTo(T[], Int32)
An
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| T[] | array | |
| System.Int32 | arrayIndex |
Dispose()
An
Declaration
public void Dispose()
Dispose(Boolean)
Disposes this instance resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | Indicates if this instance is currently disposing. |
EnsureNotDisposed()
Ensures the instance is not disposed.
Declaration
public void EnsureNotDisposed()
Finalize()
Finalizes an instance of the SharedList<T> class.
Declaration
protected void Finalize()
GetEnumerator()
An
Declaration
public IEnumerator<T> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<T> |
GetEnumerator1()
Gets an enumerator to iterate through the collection.
Declaration
public IEnumerator GetEnumerator1()
Returns
| Type | Description |
|---|---|
| IEnumerator | An enumerator that can be used to iterate through the collection. |
GetReadLock()
Gets a read lock on the resource.
Declaration
public ISharedCollectionLock GetReadLock()
Returns
| Type | Description |
|---|---|
| ISharedCollectionLock | An ISharedCollectionLock instance. |
GetReadLock(Int32)
Gets a read lock on the resource for the specified amount of time.
Declaration
public ISharedCollectionLock GetReadLock(int millisecondTimeout)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | millisecondTimeout | The number of milliseconds to lock for. |
Returns
| Type | Description |
|---|---|
| ISharedCollectionLock | An ISharedCollectionLock instance. |
GetReadLock(TimeSpan)
Gets a read lock on the resource for the specified amount of time.
Declaration
public ISharedCollectionLock GetReadLock(TimeSpan timeOut)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | timeOut | The amount of time to lock for. |
Returns
| Type | Description |
|---|---|
| ISharedCollectionLock | An ISharedCollectionLock instance. |
GetWriteLock()
Gets a write lock on the resource for the specified amount of time.
Declaration
public ISharedCollectionLock GetWriteLock()
Returns
| Type | Description |
|---|---|
| ISharedCollectionLock | An ISharedCollectionLock instance. |
GetWriteLock(Int32)
Gets a write lock on the resource for the specified amount of time.
Declaration
public ISharedCollectionLock GetWriteLock(int millisecondTimeout)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | millisecondTimeout | The number of milliseconds to lock for. |
Returns
| Type | Description |
|---|---|
| ISharedCollectionLock | An ISharedCollectionLock instance. |
GetWriteLock(TimeSpan)
Gets a write lock on the resource for the specified amount of time.
Declaration
public ISharedCollectionLock GetWriteLock(TimeSpan timeOut)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | timeOut | The amount of time to lock for. |
Returns
| Type | Description |
|---|---|
| ISharedCollectionLock | An ISharedCollectionLock instance. |
IndexOf(T)
An
Declaration
public int IndexOf(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item |
Returns
| Type | Description |
|---|---|
| System.Int32 |
Insert(Int32, T)
An
Declaration
public void Insert(int index, T item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | |
| T | item |
Remove(T)
An
Declaration
public bool Remove(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item |
Returns
| Type | Description |
|---|---|
| System.Boolean |
RemoveAt(Int32)
An
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index |