Table of Contents

Class Descriptor

Namespace
Ranorex.Core
Assembly
Ranorex.Core.dll

The base descriptor used by many classes in the core.

[TypeConverter(typeof(ExpandableObjectConverter))]
public class Descriptor : IEquatable<Descriptor>, IComparable<Descriptor>
Inheritance
Descriptor
Implements
Derived
Inherited Members

Constructors

Descriptor(string, string)

Creates a new descriptor.

public Descriptor(string displayName, string description)

Parameters

displayName string

The name of the instance the descriptor refers to.

description string

The description of the instance the descriptor refers to.

Properties

Description

The description of instance the descriptor refers to.

public string Description { get; protected set; }

Property Value

string

DisplayName

The name of the instance the descriptor refers to, with arbitrary casing.

public string DisplayName { get; }

Property Value

string

Name

The name of the instance the descriptor refers to. This is enforced to be lower-case.

public string Name { get; }

Property Value

string

Methods

CompareTo(Descriptor)

Compares the current descriptor with another descriptor.

public virtual int CompareTo(Descriptor other)

Parameters

other Descriptor

A descriptor to compare with this descriptor.

Returns

int

A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings:

ValueMeaning
Less than zeroThis object is less than the other parameter.
ZeroThis object is equal to other.
Greater than zeroThis object is greater than other.

CreateCaseInsensitiveIdentifier(string)

Creates a case insensitive identifier out of a display name.

public static string CreateCaseInsensitiveIdentifier(string displayName)

Parameters

displayName string

The display name.

Returns

string

A case insensitive identifier for the display name.

Equals(Descriptor)

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

public bool Equals(Descriptor other)

Parameters

other Descriptor

An object to compare with this object.

Returns

bool

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

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

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

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

ToString()

Creates a string representation.

public override string ToString()

Returns

string

The displayname.

Operators

operator ==(Descriptor, Descriptor)

Implements the operator ==.

public static bool operator ==(Descriptor d1, Descriptor d2)

Parameters

d1 Descriptor

Descriptor 1.

d2 Descriptor

Descriptor 2.

Returns

bool

True if the two Descriptor instances have the same Name, otherwise false.

operator !=(Descriptor, Descriptor)

Implements the operator !=.

public static bool operator !=(Descriptor d1, Descriptor d2)

Parameters

d1 Descriptor

Descriptor 1.

d2 Descriptor

Descriptor 2.

Returns

bool

True if the two Descriptor instances do not have the same Name, otherwise false.