Struct RedisValue
- Namespace
- StackExchange.Redis
- Assembly
- StackExchange.Redis.StrongName.dll
Represents values that can be stored in redis
public struct RedisValue : IEquatable<RedisValue>, IComparable<RedisValue>, IComparable, IConvertible
- Implements
- Inherited Members
Properties
EmptyString
Represents the string ""
public static RedisValue EmptyString { get; }
Property Value
HasValue
Indicates whether the value is greater than zero-length
public bool HasValue { get; }
Property Value
IsInteger
Indicates whether the value is a primitive integer
public bool IsInteger { get; }
Property Value
IsNull
Indicates whether the value should be considered a null value
public bool IsNull { get; }
Property Value
IsNullOrEmpty
Indicates whether the value is either null or a zero-length value
public bool IsNullOrEmpty { get; }
Property Value
Null
A null value
public static RedisValue Null { get; }
Property Value
Methods
CompareTo(RedisValue)
Compare against a RedisValue for relative order
public int CompareTo(RedisValue other)
Parameters
other
RedisValue
Returns
Equals(RedisValue)
Indicates whether two RedisValue values are equivalent
public bool Equals(RedisValue other)
Parameters
other
RedisValue
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()
Returns a string representation of the value
public override string ToString()
Returns
TryParse(out double)
Convert to a double if possible, returning true.
Returns false otherwise.
public bool TryParse(out double val)
Parameters
val
double
Returns
TryParse(out int)
Convert to a int if possible, returning true.
Returns false otherwise.
public bool TryParse(out int val)
Parameters
val
int
Returns
TryParse(out long)
Convert to a long if possible, returning true.
Returns false otherwise.
public bool TryParse(out long val)
Parameters
val
long
Returns
Operators
operator ==(RedisValue, RedisValue)
Indicates whether two RedisValue values are equivalent
public static bool operator ==(RedisValue x, RedisValue y)
Parameters
x
RedisValuey
RedisValue
Returns
explicit operator bool(RedisValue)
Converts the value to a Boolean
public static explicit operator bool(RedisValue value)
Parameters
value
RedisValue
Returns
explicit operator double(RedisValue)
Converts the value to a Double
public static explicit operator double(RedisValue value)
Parameters
value
RedisValue
Returns
explicit operator int(RedisValue)
Converts the value to an Int32
public static explicit operator int(RedisValue value)
Parameters
value
RedisValue
Returns
explicit operator long(RedisValue)
Converts the value to an Int64
public static explicit operator long(RedisValue value)
Parameters
value
RedisValue
Returns
explicit operator bool?(RedisValue)
Converts the value to a nullable Boolean
public static explicit operator bool?(RedisValue value)
Parameters
value
RedisValue
Returns
- bool?
explicit operator double?(RedisValue)
Converts the value to a nullable Double
public static explicit operator double?(RedisValue value)
Parameters
value
RedisValue
Returns
explicit operator int?(RedisValue)
Converts the value to a nullable Int32
public static explicit operator int?(RedisValue value)
Parameters
value
RedisValue
Returns
- int?
explicit operator long?(RedisValue)
Converts the value to a nullable Int64
public static explicit operator long?(RedisValue value)
Parameters
value
RedisValue
Returns
- long?
implicit operator byte[](RedisValue)
Converts the value to a byte[]
public static implicit operator byte[](RedisValue value)
Parameters
value
RedisValue
Returns
- byte[]
implicit operator string(RedisValue)
Converts the value to a String
public static implicit operator string(RedisValue value)
Parameters
value
RedisValue
Returns
implicit operator RedisValue(bool)
Creates a new RedisValue from a Boolean
public static implicit operator RedisValue(bool value)
Parameters
value
bool
Returns
implicit operator RedisValue(byte[])
Creates a new RedisValue from a Byte[]
public static implicit operator RedisValue(byte[] value)
Parameters
value
byte[]
Returns
implicit operator RedisValue(double)
Creates a new RedisValue from a Double
public static implicit operator RedisValue(double value)
Parameters
value
double
Returns
implicit operator RedisValue(int)
Creates a new RedisValue from an Int32
public static implicit operator RedisValue(int value)
Parameters
value
int
Returns
implicit operator RedisValue(long)
Creates a new RedisValue from an Int64
public static implicit operator RedisValue(long value)
Parameters
value
long
Returns
implicit operator RedisValue(bool?)
Creates a new RedisValue from a nullable Boolean
public static implicit operator RedisValue(bool? value)
Parameters
value
bool?
Returns
implicit operator RedisValue(double?)
Creates a new RedisValue from a nullable Double
public static implicit operator RedisValue(double? value)
Parameters
value
double?
Returns
implicit operator RedisValue(int?)
Creates a new RedisValue from a nullable Int32
public static implicit operator RedisValue(int? value)
Parameters
value
int?
Returns
implicit operator RedisValue(long?)
Creates a new RedisValue from a nullable Int64
public static implicit operator RedisValue(long? value)
Parameters
value
long?
Returns
implicit operator RedisValue(string)
Creates a new RedisValue from a String
public static implicit operator RedisValue(string value)
Parameters
value
string
Returns
operator !=(RedisValue, RedisValue)
Indicates whether two RedisValue values are equivalent
public static bool operator !=(RedisValue x, RedisValue y)
Parameters
x
RedisValuey
RedisValue