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
otherRedisValue
Returns
Equals(RedisValue)
Indicates whether two RedisValue values are equivalent
public bool Equals(RedisValue other)
Parameters
otherRedisValue
Returns
Equals(object)
See Object.Equals()
public override bool Equals(object obj)
Parameters
objobject
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
valdouble
Returns
TryParse(out int)
Convert to a int if possible, returning true.
Returns false otherwise.
public bool TryParse(out int val)
Parameters
valint
Returns
TryParse(out long)
Convert to a long if possible, returning true.
Returns false otherwise.
public bool TryParse(out long val)
Parameters
vallong
Returns
Operators
operator ==(RedisValue, RedisValue)
Indicates whether two RedisValue values are equivalent
public static bool operator ==(RedisValue x, RedisValue y)
Parameters
xRedisValueyRedisValue
Returns
explicit operator bool(RedisValue)
Converts the value to a Boolean
public static explicit operator bool(RedisValue value)
Parameters
valueRedisValue
Returns
explicit operator double(RedisValue)
Converts the value to a Double
public static explicit operator double(RedisValue value)
Parameters
valueRedisValue
Returns
explicit operator int(RedisValue)
Converts the value to an Int32
public static explicit operator int(RedisValue value)
Parameters
valueRedisValue
Returns
explicit operator long(RedisValue)
Converts the value to an Int64
public static explicit operator long(RedisValue value)
Parameters
valueRedisValue
Returns
explicit operator bool?(RedisValue)
Converts the value to a nullable Boolean
public static explicit operator bool?(RedisValue value)
Parameters
valueRedisValue
Returns
- bool?
explicit operator double?(RedisValue)
Converts the value to a nullable Double
public static explicit operator double?(RedisValue value)
Parameters
valueRedisValue
Returns
explicit operator int?(RedisValue)
Converts the value to a nullable Int32
public static explicit operator int?(RedisValue value)
Parameters
valueRedisValue
Returns
- int?
explicit operator long?(RedisValue)
Converts the value to a nullable Int64
public static explicit operator long?(RedisValue value)
Parameters
valueRedisValue
Returns
- long?
implicit operator byte[](RedisValue)
Converts the value to a byte[]
public static implicit operator byte[](RedisValue value)
Parameters
valueRedisValue
Returns
- byte[]
implicit operator string(RedisValue)
Converts the value to a String
public static implicit operator string(RedisValue value)
Parameters
valueRedisValue
Returns
implicit operator RedisValue(bool)
Creates a new RedisValue from a Boolean
public static implicit operator RedisValue(bool value)
Parameters
valuebool
Returns
implicit operator RedisValue(byte[])
Creates a new RedisValue from a Byte[]
public static implicit operator RedisValue(byte[] value)
Parameters
valuebyte[]
Returns
implicit operator RedisValue(double)
Creates a new RedisValue from a Double
public static implicit operator RedisValue(double value)
Parameters
valuedouble
Returns
implicit operator RedisValue(int)
Creates a new RedisValue from an Int32
public static implicit operator RedisValue(int value)
Parameters
valueint
Returns
implicit operator RedisValue(long)
Creates a new RedisValue from an Int64
public static implicit operator RedisValue(long value)
Parameters
valuelong
Returns
implicit operator RedisValue(bool?)
Creates a new RedisValue from a nullable Boolean
public static implicit operator RedisValue(bool? value)
Parameters
valuebool?
Returns
implicit operator RedisValue(double?)
Creates a new RedisValue from a nullable Double
public static implicit operator RedisValue(double? value)
Parameters
valuedouble?
Returns
implicit operator RedisValue(int?)
Creates a new RedisValue from a nullable Int32
public static implicit operator RedisValue(int? value)
Parameters
valueint?
Returns
implicit operator RedisValue(long?)
Creates a new RedisValue from a nullable Int64
public static implicit operator RedisValue(long? value)
Parameters
valuelong?
Returns
implicit operator RedisValue(string)
Creates a new RedisValue from a String
public static implicit operator RedisValue(string value)
Parameters
valuestring
Returns
operator !=(RedisValue, RedisValue)
Indicates whether two RedisValue values are equivalent
public static bool operator !=(RedisValue x, RedisValue y)
Parameters
xRedisValueyRedisValue