Search Results for

    Show / Hide Table of Contents

    Class Result

    Struct for containing the result of running a native Chroma SDK function.

    Inheritance
    Object
    Result
    Implements
    IEquatable<Int32>
    IEquatable<Result>
    Namespace: Colore.Data
    Assembly: Colore.dll
    Syntax
    public sealed class Result : ValueType
    Remarks

    RZRESULT is a typedef of LONG on C-side. LONG is always 32-bit in WinAPI. This means we don't need to have architecture-dependent base type.

    Constructors

    Result(Int32)

    Initializes a new instance of the Result struct.

    Declaration
    public Result(int value)
    Parameters
    Type Name Description
    Int32 value

    Value to store.

    Fields

    DeviceNotConnected

    The device is not connected.

    Declaration
    public static readonly Result DeviceNotConnected
    Field Value
    Type Description
    Result

    RzAccessDenied

    Access denied.

    Declaration
    public static readonly Result RzAccessDenied
    Field Value
    Type Description
    Result

    RzFailed

    Generic fail error.

    Declaration
    public static readonly Result RzFailed
    Field Value
    Type Description
    Result

    RzInvalid

    Invalid error.

    Declaration
    public static readonly Result RzInvalid
    Field Value
    Type Description
    Result

    RzInvalidParameter

    Invalid parameter passed to function.

    Declaration
    public static readonly Result RzInvalidParameter
    Field Value
    Type Description
    Result

    RzNotSupported

    The requested operation is not supported.

    Declaration
    public static readonly Result RzNotSupported
    Field Value
    Type Description
    Result

    RzRequestAborted

    The request was aborted.

    Declaration
    public static readonly Result RzRequestAborted
    Field Value
    Type Description
    Result

    RzResourceDisabled

    Resource not available or disabled.

    Declaration
    public static readonly Result RzResourceDisabled
    Field Value
    Type Description
    Result

    RzSingleInstanceApp

    Cannot start more than one instance of the specified program.

    Declaration
    public static readonly Result RzSingleInstanceApp
    Field Value
    Type Description
    Result

    RzSuccess

    Returned when a function is successful.

    Declaration
    public static readonly Result RzSuccess
    Field Value
    Type Description
    Result

    Properties

    Description

    Gets the help description for the current error value.

    Declaration
    public string Description { get; }
    Property Value
    Type Description
    String

    Failed

    Gets a value indicating whether the result means failure.

    Declaration
    public bool Failed { get; }
    Property Value
    Type Description
    Boolean

    IsTrue

    Gets a value indicating whether this instance of Result is truthy.

    Declaration
    public bool IsTrue { get; }
    Property Value
    Type Description
    Boolean

    true if this is a successful result, otherwise false.

    Name

    Gets the name of the error as defined in source code.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String

    Success

    Gets a value indicating whether the result was a success.

    Declaration
    public bool Success { get; }
    Property Value
    Type Description
    Boolean

    Value

    Gets the internal result value.

    Declaration
    public int Value { get; }
    Property Value
    Type Description
    Int32

    Methods

    Equals(Result)

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

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

    An object to compare with this object.

    Returns
    Type Description
    Boolean

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

    Equals(Int32)

    Indicates whether the internal value of the current Result struct is equal to another value.

    Declaration
    public bool Equals(int other)
    Parameters
    Type Name Description
    Int32 other

    A value to compare with this object's internal value.

    Returns
    Type Description
    Boolean

    true if the internal value is equal to the other parameter, otherwise false.

    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
    Boolean

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

    FromInt32(Int32)

    Convert an integer value to a Result object.

    Declaration
    public static Result FromInt32(int value)
    Parameters
    Type Name Description
    Int32 value

    The value to convert.

    Returns
    Type Description
    Result

    An instance of Result.

    FromResult(Int32)

    Convert an integer value to a Result object.

    Declaration
    public static Result FromResult(int value)
    Parameters
    Type Name Description
    Int32 value

    The value to convert.

    Returns
    Type Description
    Result

    An instance of Result.

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

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

    ToBoolean()

    Converts this Result to a boolean value.

    Declaration
    public bool ToBoolean()
    Returns
    Type Description
    Boolean

    The result of the conversion.

    ToInt32()

    Converts this instance of Result to an integer value.

    Declaration
    public int ToInt32()
    Returns
    Type Description
    Int32

    The integer value of this Result.

    ToString()

    Returns a string representation of the result.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A String containing a string representation of the result complete with name, description, and numeric value.

    Operators

    Equality(Result, Object)

    Indicates whether an instance of the Result struct is equal to another object.

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

    Left operand, an instance of the Result struct.

    Object right

    Right operand, an object to compare with.

    Returns
    Type Description
    Boolean

    true if the two objects are equal, otherwise false.

    False(Result)

    Converts a Result object to false.

    Declaration
    public static bool operator false (Result result)
    Parameters
    Type Name Description
    Result result

    Result object to convert.

    Returns
    Type Description
    Boolean

    false if the Result object represents a boolean false value, otherwise true.

    Implicit(Result to Boolean)

    Converts an instance of the Result struct to its boolean equivalent.

    Declaration
    public static implicit operator bool (Result result)
    Parameters
    Type Name Description
    Result result

    The Result to convert.

    Returns
    Type Description
    Boolean

    true if the result represents a true value (success), otherwise false (failure).

    Implicit(Result to Int32)

    Converts a Result struct to its integer equivalent.

    Declaration
    public static implicit operator int (Result result)
    Parameters
    Type Name Description
    Result result

    An instance of the Result to convert.

    Returns
    Type Description
    Int32

    The integer equivalent of the result.

    Implicit(Int32 to Result)

    Converts an integer value to its equivalent Result object.

    Declaration
    public static implicit operator Result(int value)
    Parameters
    Type Name Description
    Int32 value

    The value to convert.

    Returns
    Type Description
    Result

    The Result equivalent of the value.

    Inequality(Result, Object)

    Indicates whether an instance of the Result struct and another object are not equal.

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

    Left operand, an instance of the Result struct.

    Object right

    Right operand, an object to compare to.

    Returns
    Type Description
    Boolean

    true if the two objects are not equal, otherwise false.

    True(Result)

    Converts a Result object to a boolean true value.

    Declaration
    public static bool operator true (Result result)
    Parameters
    Type Name Description
    Result result

    Object to convert.

    Returns
    Type Description
    Boolean

    true if the object represents a boolean true value, false otherwise.

    Implements

    System.IEquatable<T>
    System.IEquatable<T>
    In This Article
    Back to top Copyright © 2015-2022 by Adam Hellberg and Brandon Scott
    Generated by DocFX