Gorgon
Show / Hide Table of Contents

Struct GorgonResult

An error code message that is usually sent along with a GorgonException.

Implements
IGorgonNamedObject
IGorgonEquatableByRef<GorgonResult>
IEquatable<GorgonResult>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: Gorgon.Core
Assembly: Gorgon.Core.dll
Syntax
public readonly struct GorgonResult : IGorgonNamedObject, IGorgonEquatableByRef<GorgonResult>, IEquatable<GorgonResult>

Constructors

| Edit this page View Source

GorgonResult(string, int, string)

Initializes a new instance of the GorgonResult struct.

Declaration
public GorgonResult(string name, int code, string description)
Parameters
Type Name Description
string name

The name of the error.

int code

The numeric code assigned to the error.

string description

The full description of the error.

Exceptions
Type Condition
ArgumentNullException

Thrown when the name or description parameter is null

ArgumentEmptyException

Thrown when the name or description parameter is an empty string.

Properties

| Edit this page View Source

AccessDenied

Access is denied.

Declaration
public static GorgonResult AccessDenied { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

AlreadyInitialized

Initialization was already performed.

Declaration
public static GorgonResult AlreadyInitialized { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

CannotBind

There was an error during binding.

Declaration
public static GorgonResult CannotBind { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

CannotCompile

Cannot compile the source code.

Declaration
public static GorgonResult CannotCompile { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

CannotCreate

There was an error during creation.

Declaration
public static GorgonResult CannotCreate { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

CannotEnumerate

There was an error during the enumeration process.

Declaration
public static GorgonResult CannotEnumerate { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

CannotRead

There was an error while reading.

Declaration
public static GorgonResult CannotRead { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

CannotWrite

There was an error while writing.

Declaration
public static GorgonResult CannotWrite { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

Code

Property to set or return the error code to be sent along with the GorgonException.

Declaration
public int Code { get; }
Property Value
Type Description
int
| Edit this page View Source

CrossThreadCall

Cannot make this call across threads.

Declaration
public static GorgonResult CrossThreadCall { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

Description

Property to set or return the error message to be sent along with the GorgonException.

Declaration
public string Description { get; }
Property Value
Type Description
string
| Edit this page View Source

DriverError

There was an error interfacing with the driver.

Declaration
public static GorgonResult DriverError { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

FormatNotSupported

The requested format is not supported.

Declaration
public static GorgonResult FormatNotSupported { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

InvalidFileFormat

The file format is not supported.

Declaration
public static GorgonResult InvalidFileFormat { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

Name

Property to return the name of the error.

Declaration
public string Name { get; }
Property Value
Type Description
string
| Edit this page View Source

NotInitialized

Initialization is required before continuing this operation.

Declaration
public static GorgonResult NotInitialized { get; }
Property Value
Type Description
GorgonResult
| Edit this page View Source

OutOfMemory

There was not enough memory to complete the operation.

Declaration
public static GorgonResult OutOfMemory { get; }
Property Value
Type Description
GorgonResult

Methods

| Edit this page View Source

Equals(GorgonResult)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(GorgonResult other)
Parameters
Type Name Description
GorgonResult other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the other parameter; otherwise, false.

| Edit this page View Source

Equals(in GorgonResult)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(in GorgonResult other)
Parameters
Type Name Description
GorgonResult other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the other parameter; otherwise, false.

| Edit this page View Source

Equals(in GorgonResult, in GorgonResult)

Function to compare two instances for equality.

Declaration
public static bool Equals(in GorgonResult left, in GorgonResult right)
Parameters
Type Name Description
GorgonResult left

The left instance to compare.

GorgonResult right

The right instance to compare.

Returns
Type Description
bool

true if equal, false if not.

| Edit this page View Source

Equals(object)

Indicates whether this instance and a specified object are equal.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

Another object to compare to.

Returns
Type Description
bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
ValueType.Equals(object)
| Edit this page View Source

GetHashCode()

Returns the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A 32-bit signed integer that is the hash code for this instance.

Overrides
ValueType.GetHashCode()
| Edit this page View Source

ToString()

Returns the fully qualified type name of this instance.

Declaration
public override string ToString()
Returns
Type Description
string

A string containing a fully qualified type name.

Overrides
ValueType.ToString()

Operators

| Edit this page View Source

operator ==(GorgonResult, GorgonResult)

Operator to test for equality.

Declaration
public static bool operator ==(GorgonResult left, GorgonResult right)
Parameters
Type Name Description
GorgonResult left

The left item to test.

GorgonResult right

The right item to test.

Returns
Type Description
bool

true if equal, false if not.

| Edit this page View Source

operator !=(GorgonResult, GorgonResult)

Operator to test for inequality.

Declaration
public static bool operator !=(GorgonResult left, GorgonResult right)
Parameters
Type Name Description
GorgonResult left

The left item to test.

GorgonResult right

The right item to test.

Returns
Type Description
bool

true if not equal, false if the items are equal.

Implements

IGorgonNamedObject
IGorgonEquatableByRef<T>
IEquatable<T>

Extension Methods

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