Gorgon
Show / Hide Table of Contents

Interface IGorgonNamedObject

Gives an arbitrary object type a name to be used for lookup or another things that require an identifier.

Namespace: Gorgon.Core
Assembly: Gorgon.Core.dll
Syntax
public interface IGorgonNamedObject
Remarks

Many objects require an ID to give uniqueness to that object. This could be necessary for lookup in a IDictionary<TKey, TValue>, or merely for logging purposes. This interface will ensure that items that need a textual representation of the object have a Name they can use for that purpose.

Properties

| Edit this page View Source

Name

Property to return the name of this object.

Declaration
string Name { get; }
Property Value
Type Description
string
Remarks

For best practice, the name should only be set once during the lifetime of an object. Hence, this interface only provides a read-only implementation of this property.

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
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