Gorgon
Show / Hide Table of Contents

Interface IGorgonNamedObjectReadOnlyDictionary<T>

A generic interface for a read only dictionary of named objects that can be indexed by name.

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

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

Properties

| Edit this page View Source

this[string]

Property to return an item in the dictionary 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

trueif found, false if not.

| Edit this page View Source

TryGetValue(string, out T)

Function to return an item from the collection.

Declaration
bool TryGetValue(string name, out T value)
Parameters
Type Name Description
string name

The name of the item to look up.

T value

The item, if found, or the default value for the type if not.

Returns
Type Description
bool

true if the item was found, false if not.

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>>)
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