Class GorgonNamedObject
Abstract implementation of the IGorgonNamedObject interface.
Inheritance
Implements
Inherited Members
Namespace: Gorgon.Core
Assembly: Gorgon.Core.dll
Syntax
public abstract class GorgonNamedObject : IGorgonNamedObject
Remarks
This abstract implementation of IGorgonNamedObject is provided as a convenience when an object requires a name.
Constructors
| Edit this page View SourceGorgonNamedObject(string)
Initializes a new instance of the GorgonNamedObject class.
Declaration
protected GorgonNamedObject(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of this object. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
ArgumentEmptyException | Thrown when the |
Properties
| Edit this page View SourceName
Property to return the name of this object.
Declaration
public virtual string Name { get; protected set; }
Property Value
Type | Description |
---|---|
string |
Remarks
Unlike the interface this property is derived from, this property has a protected setter to assign the name at a later stage during an objects initialization.
Methods
| Edit this page View SourceGetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
| Edit this page View SourceToString()
Returns a string that represents the current GorgonNamedObject.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current GorgonNamedObject. |