Gorgon
Show / Hide Table of Contents

Struct GorgonShaderMacro

A macro for a shader.

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

Constructors

| Edit this page View Source

GorgonShaderMacro(string, string)

Initializes a new instance of the GorgonShaderMacro struct.

Declaration
public GorgonShaderMacro(string name, string value = null)
Parameters
Type Name Description
string name

The name of the macro.

string value

[Optional] The value for the macro.

Exceptions
Type Condition
ArgumentNullException

Thrown when the name parameter is null.

ArgumentEmptyException

Thrown when the name parameter is empty.

Properties

| Edit this page View Source

Name

Property to return the name of the macro.

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

Value

Property to return the value for the macro.

Declaration
public object Value { get; }
Property Value
Type Description
object

Methods

| Edit this page View Source

Equals(GorgonShaderMacro)

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

Declaration
public bool Equals(GorgonShaderMacro other)
Parameters
Type Name Description
GorgonShaderMacro 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 GorgonShaderMacro, in GorgonShaderMacro)

Function to determine if two instances are equal or not.

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

Left instance to compare.

GorgonShaderMacro right

Right instance to compare.

Returns
Type Description
bool

true if equal, false if not.

| Edit this page View Source

Equals(object)

Determines whether the specified object, is equal to this instance.

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

The object to compare with this instance.

Returns
Type Description
bool

true if the specified object is equal to this instance; otherwise, false.

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

GetHashCode()

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
ValueType.GetHashCode()
| Edit this page View Source

ToString()

Returns a string that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents this instance.

Overrides
ValueType.ToString()

Operators

| Edit this page View Source

operator ==(GorgonShaderMacro, GorgonShaderMacro)

Operator to compare two instances for equality.

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

Left instance to compare.

GorgonShaderMacro right

Right instance to compare.

Returns
Type Description
bool

true if equal, false if not.

| Edit this page View Source

operator !=(GorgonShaderMacro, GorgonShaderMacro)

Operator to compare two instances for inequality.

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

Left instance to compare.

GorgonShaderMacro right

Right instance to compare.

Returns
Type Description
bool

true if not equal, false if equal.

Implements

IGorgonNamedObject
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