API version:
Show / Hide Table of Contents

Class CastingListAdapter<T>

Wraps a generic List<object> and casts the items to the destination type.

Inheritance
System.Object
CastingListAdapter<T>
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Okta.Sdk.Internal
Assembly: Okta.Sdk.dll
Syntax
public sealed class CastingListAdapter<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Name Description
T

The destination type.

Constructors

CastingListAdapter(IList<Object>, ResourceFactory, ILogger)

Initializes a new instance of the CastingListAdapter<T> class.

Declaration
public CastingListAdapter(IList<object> genericList, ResourceFactory resourceFactory, ILogger logger)
Parameters
Type Name Description
System.Collections.Generic.IList<System.Object> genericList

The generic list to wrap.

ResourceFactory resourceFactory

The resource factory

Microsoft.Extensions.Logging.ILogger logger

The logging interface.

Properties

Count

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

IsReadOnly

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

Item[Int32]

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

Methods

Add(T)

Declaration
public void Add(T item)
Parameters
Type Name Description
T item

Clear()

Declaration
public void Clear()

Contains(T)

Declaration
public bool Contains(T item)
Parameters
Type Name Description
T item
Returns
Type Description
System.Boolean

CopyTo(T[], Int32)

Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type Name Description
T[] array
System.Int32 arrayIndex

GetEnumerator()

Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<T>

IndexOf(T)

Declaration
public int IndexOf(T item)
Parameters
Type Name Description
T item
Returns
Type Description
System.Int32

Insert(Int32, T)

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

Remove(T)

Declaration
public bool Remove(T item)
Parameters
Type Name Description
T item
Returns
Type Description
System.Boolean

RemoveAt(Int32)

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

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Back to top Copyright © 2021 Okta, Inc.
Generated with DocFx.