Class ResourceNameList<TName> (4.0.0)

public sealed class ResourceNameList<TName> : IList<TName>, ICollection<TName>, IEnumerable<TName>, IEnumerable where TName : class, IResourceName

A list of resource names of a specific type, that delegates all operations to an underlying list of string-based resource names.

Inheritance

Object > ResourceNameList<TName>

Implements

IList<TName>, ICollection<TName>, IEnumerable<TName>, IEnumerable

Namespace

Google.Api.Gax

Assembly

Google.Api.Gax.dll

Type Parameter

NameDescription
TName

The type of the resource name contained in this list.

Constructors

ResourceNameList(IList<String>, Func<String, TName>)

public ResourceNameList(IList<string> underlyingList, Func<string, TName> stringToName)

Constructs a ResourceNameList<TName> from an underlying string-based list and a resource name parser.

Parameters
NameDescription
underlyingListIList<String>
stringToNameFunc<String, TName>

Properties

Count

public int Count { get; }
Property Value
TypeDescription
Int32

IsReadOnly

public bool IsReadOnly { get; }
Property Value
TypeDescription
Boolean

Item[Int32]

public TName this[int index] { get; set; }
Parameter
NameDescription
indexInt32
Property Value
TypeDescription
TName

Methods

Add(TName)

public void Add(TName item)
Parameter
NameDescription
itemTName

Add(IEnumerable<TName>)

public void Add(IEnumerable<TName> items)

Adds all items to this list.

Parameter
NameDescription
itemsIEnumerable<TName>

The items to add to this list.

Clear()

public void Clear()

Contains(TName)

public bool Contains(TName item)
Parameter
NameDescription
itemTName
Returns
TypeDescription
Boolean

CopyTo(TName[], Int32)

public void CopyTo(TName[] array, int arrayIndex)
Parameters
NameDescription
arrayTName[]
arrayIndexInt32

GetEnumerator()

public IEnumerator<TName> GetEnumerator()
Returns
TypeDescription
IEnumerator<TName>

IndexOf(TName)

public int IndexOf(TName item)
Parameter
NameDescription
itemTName
Returns
TypeDescription
Int32

Insert(Int32, TName)

public void Insert(int index, TName item)
Parameters
NameDescription
indexInt32
itemTName

Remove(TName)

public bool Remove(TName item)
Parameter
NameDescription
itemTName
Returns
TypeDescription
Boolean

RemoveAt(Int32)

public void RemoveAt(int index)
Parameter
NameDescription
indexInt32

Explicit Interface Implementations

IEnumerable.GetEnumerator()

IEnumerator IEnumerable.GetEnumerator()
Returns
TypeDescription
IEnumerator