Struct SlotRange
- Namespace
- StackExchange.Redis
- Assembly
- StackExchange.Redis.StrongName.dll
Indicates a range of slots served by a cluster node
public struct SlotRange : IEquatable<SlotRange>, IComparable<SlotRange>, IComparable
- Implements
- Inherited Members
Constructors
SlotRange(int, int)
Create a new SlotRange value
public SlotRange(int from, int to)
Parameters
Properties
From
The start of the range (inclusive)
public int From { get; }
Property Value
To
The end of the range (inclusive)
public int To { get; }
Property Value
Methods
CompareTo(SlotRange)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(SlotRange other)
Parameters
other
SlotRange
Returns
Equals(SlotRange)
Indicates whether two ranges are equal
public bool Equals(SlotRange range)
Parameters
range
SlotRange
Returns
Equals(object)
See Object.Equals
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
See Object.GetHashCode()
public override int GetHashCode()
Returns
ToString()
See Object.ToString()
public override string ToString()
Returns
TryParse(string, out SlotRange)
Try to parse a string as a range
public static bool TryParse(string range, out SlotRange value)
Parameters
Returns
Operators
operator ==(SlotRange, SlotRange)
Indicates whether two ranges are equal
public static bool operator ==(SlotRange x, SlotRange y)
Parameters
Returns
operator !=(SlotRange, SlotRange)
Indicates whether two ranges are not equal
public static bool operator !=(SlotRange x, SlotRange y)