Gorgon
Show / Hide Table of Contents

Interface IGorgonNamedObjectReadOnlyList<T>

A generic interface for a read only list of named objects that can be indexed by name and numeric index.

Inherited Members
IReadOnlyList<T>.this[int]
IReadOnlyCollection<T>.Count
IEnumerable<T>.GetEnumerator()
Namespace: Gorgon.Collections
Assembly: Gorgon.Core.dll
Syntax
public interface IGorgonNamedObjectReadOnlyList<T> : IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable where T : IGorgonNamedObject
Type Parameters
Name Description
T

The type of object stored in the collection. Must implement the IGorgonNamedObject interface.

Properties

| Edit this page View Source

this[string]

Property to return an item in this list by its name.

Declaration
T this[string name] { get; }
Parameters
Type Name Description
string name
Property Value
Type Description
T
| Edit this page View Source

KeysAreCaseSensitive

Property to return whether the keys are case sensitive.

Declaration
bool KeysAreCaseSensitive { get; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

Contains(string)

Function to return whether an item with the specified name exists in this collection.

Declaration
bool Contains(string name)
Parameters
Type Name Description
string name

Name of the item to find.

Returns
Type Description
bool

true if found, false if not.

| Edit this page View Source

Contains(T)

Determines whether the list contains a specific value.

Declaration
bool Contains(T item)
Parameters
Type Name Description
T item

The object to locate in the list.

Returns
Type Description
bool

true if item is found in the list; otherwise, false.

| Edit this page View Source

IndexOf(string)

Determines the index of a specific item in the list.

Declaration
int IndexOf(string name)
Parameters
Type Name Description
string name

Name of the item to find.

Returns
Type Description
int

The index of name if found in the list; otherwise, -1.

| Edit this page View Source

IndexOf(T)

Determines the index of a specific item in the list.

Declaration
int IndexOf(T item)
Parameters
Type Name Description
T item

The object to locate in the list.

Returns
Type Description
int

The index of item if found in the list; otherwise, -1.

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonTreeLinqExtensions.TraverseDepthFirst<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
GorgonTreeLinqExtensions.Traverse<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
GorgonIReadOnlyListExtensions.Contains<T>(IReadOnlyList<T>, T)
GorgonIReadOnlyListExtensions.CopyTo<T>(IReadOnlyList<T>, T[])
GorgonIReadOnlyListExtensions.FirstIndexOf<T>(IReadOnlyList<T>, Predicate<T>)
GorgonIReadOnlyListExtensions.IndexOf<T>(IReadOnlyList<T>, T)
GorgonIReadOnlyListExtensions.LastIndexOf<T>(IReadOnlyList<T>, Predicate<T>)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author