Search Results for

    Show / Hide Table of Contents

    Class Revlev

    Standard IPyramidDevice revision descriptor. A revision can be compared using fluent comparison operations such as Equals, Less Than, Greater Than, etc. Older firmware is considerd "less than" newer firmware using semantic versioning rules.

    0.0.0 is an invalid firmware revision and is used as the default "invalid" revision.

    Inheritance
    System.Object
    Revlev
    Implements
    IEquatable<Revlev>
    Namespace: PTIRelianceLib
    Assembly: PTIRelianceLib.dll
    Syntax
    public class Revlev : IComparable, IParseable, IEquatable<Revlev>

    Constructors

    | Improve this Doc View Source

    Revlev()

    Create a new Revlev object with default value of 0.0.0.

    Declaration
    public Revlev()
    | Improve this Doc View Source

    Revlev(Int32, Int32, Int32)

    Explicitly construct a new revlev in proper order of maj.min.build. Only positive values will be stored.

    Declaration
    public Revlev(int maj, int min, int build)
    Parameters
    Type Name Description
    System.Int32 maj

    First part of revision

    System.Int32 min

    Middle part of revision

    System.Int32 build

    Last part of revision

    | Improve this Doc View Source

    Revlev(String)

    Build a new Revlev type by parsing revlev in the format X.X.XX. The minor and build fields may be omitted. In this case, the values will be set to 0. If a non-numeric or otheriwse invalid revlev is provided, an exception of type ArgumentException will be thrown.

    Declaration
    public Revlev(string revlev)
    Parameters
    Type Name Description
    System.String revlev

    String of conforming format X.X.XX

    Fields

    | Improve this Doc View Source

    Build

    Third component of version Major.Minor.Build

    Declaration
    public readonly int Build
    Field Value
    Type Description
    System.Int32

    Build component of revision

    | Improve this Doc View Source

    Major

    First component of version Major.Minor.Build

    Declaration
    public readonly int Major
    Field Value
    Type Description
    System.Int32

    Major component of revision

    | Improve this Doc View Source

    Minor

    Second component of version Major.Minor.Build

    Declaration
    public readonly int Minor
    Field Value
    Type Description
    System.Int32

    Minor component of revision

    Methods

    | Improve this Doc View Source

    CompareTo(Object)

    Compares this Revlev to another object obj

    Declaration
    public int CompareTo(object obj)
    Parameters
    Type Name Description
    System.Object obj

    Object to compare

    Returns
    Type Description
    System.Int32
    • < 0 if this < obj
    • 0 if this == obj
    • > 0 if this > obj
    | Improve this Doc View Source

    Equals(Revlev)

    Compares this to another Revlev.

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

    Object to compare to

    Returns
    Type Description
    System.Boolean

    True if equal

    | Improve this Doc View Source

    Equals(Object)

    Compares this to another Object.

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    System.Object other

    Object to compare to

    Returns
    Type Description
    System.Boolean

    True if equal

    | Improve this Doc View Source

    GetHashCode()

    Returns hashcode for this revision

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    Integer hashcode

    | Improve this Doc View Source

    Serialize()

    Declaration
    public byte[] Serialize()
    Returns
    Type Description
    System.Byte[]

    Payload data

    | Improve this Doc View Source

    ToString()

    Returns this object in the format X.X.XX If the device is not conneted, the string "Not Connected" will instead be returned.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    string formatted as X.X.XX or "Not Connected"

    Operators

    | Improve this Doc View Source

    Equality(Revlev, Revlev)

    Returns true if r1 is == r2

    Declaration
    public static bool operator ==(Revlev r1, Revlev r2)
    Parameters
    Type Name Description
    Revlev r1

    Left hand side

    Revlev r2

    Right hand side

    Returns
    Type Description
    System.Boolean

    bool

    | Improve this Doc View Source

    GreaterThan(Revlev, Revlev)

    Returns true if r1 is > r2

    Declaration
    public static bool operator>(Revlev r1, Revlev r2)
    Parameters
    Type Name Description
    Revlev r1

    Left hand side

    Revlev r2

    Right hand side

    Returns
    Type Description
    System.Boolean

    bool

    | Improve this Doc View Source

    GreaterThanOrEqual(Revlev, Revlev)

    Returns true if r1 is >= r2

    Declaration
    public static bool operator >=(Revlev r1, Revlev r2)
    Parameters
    Type Name Description
    Revlev r1

    Left hand side

    Revlev r2

    Right hand side

    Returns
    Type Description
    System.Boolean

    bool

    | Improve this Doc View Source

    Inequality(Revlev, Revlev)

    Returns true if r1 is != r2

    Declaration
    public static bool operator !=(Revlev r1, Revlev r2)
    Parameters
    Type Name Description
    Revlev r1

    Left hand side

    Revlev r2

    Right hand side

    Returns
    Type Description
    System.Boolean

    bool

    | Improve this Doc View Source

    LessThan(Revlev, Revlev)

    Returns true if r1 is < r2

    Declaration
    public static bool operator <(Revlev r1, Revlev r2)
    Parameters
    Type Name Description
    Revlev r1

    Left hand side

    Revlev r2

    Right hand side

    Returns
    Type Description
    System.Boolean

    bool

    | Improve this Doc View Source

    LessThanOrEqual(Revlev, Revlev)

    Returns true if r1 is <= r2

    Declaration
    public static bool operator <=(Revlev r1, Revlev r2)
    Parameters
    Type Name Description
    Revlev r1

    Left hand side

    Revlev r2

    Right hand side

    Returns
    Type Description
    System.Boolean

    bool

    Implements

    IEquatable<>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 Pyramid Technologies
    Generated by DocFX