Table of Contents

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

RedisValue

HasValue

Indicates whether the value is greater than zero-length

public bool HasValue { get; }

Property Value

bool

IsInteger

Indicates whether the value is a primitive integer

public bool IsInteger { get; }

Property Value

bool

IsNull

Indicates whether the value should be considered a null value

public bool IsNull { get; }

Property Value

bool

IsNullOrEmpty

Indicates whether the value is either null or a zero-length value

public bool IsNullOrEmpty { get; }

Property Value

bool

Null

A null value

public static RedisValue Null { get; }

Property Value

RedisValue

Methods

CompareTo(RedisValue)

Compare against a RedisValue for relative order

public int CompareTo(RedisValue other)

Parameters

other RedisValue

Returns

int

Equals(RedisValue)

Indicates whether two RedisValue values are equivalent

public bool Equals(RedisValue other)

Parameters

other RedisValue

Returns

bool

Equals(object)

See Object.Equals()

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

See Object.GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

Returns a string representation of the value

public override string ToString()

Returns

string

TryParse(out double)

Convert to a double if possible, returning true.

Returns false otherwise.

public bool TryParse(out double val)

Parameters

val double

Returns

bool

TryParse(out int)

Convert to a int if possible, returning true.

Returns false otherwise.

public bool TryParse(out int val)

Parameters

val int

Returns

bool

TryParse(out long)

Convert to a long if possible, returning true.

Returns false otherwise.

public bool TryParse(out long val)

Parameters

val long

Returns

bool

Operators

operator ==(RedisValue, RedisValue)

Indicates whether two RedisValue values are equivalent

public static bool operator ==(RedisValue x, RedisValue y)

Parameters

x RedisValue
y RedisValue

Returns

bool

explicit operator bool(RedisValue)

Converts the value to a Boolean

public static explicit operator bool(RedisValue value)

Parameters

value RedisValue

Returns

bool

explicit operator double(RedisValue)

Converts the value to a Double

public static explicit operator double(RedisValue value)

Parameters

value RedisValue

Returns

double

explicit operator int(RedisValue)

Converts the value to an Int32

public static explicit operator int(RedisValue value)

Parameters

value RedisValue

Returns

int

explicit operator long(RedisValue)

Converts the value to an Int64

public static explicit operator long(RedisValue value)

Parameters

value RedisValue

Returns

long

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

double?

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

string

implicit operator RedisValue(bool)

Creates a new RedisValue from a Boolean

public static implicit operator RedisValue(bool value)

Parameters

value bool

Returns

RedisValue

implicit operator RedisValue(byte[])

Creates a new RedisValue from a Byte[]

public static implicit operator RedisValue(byte[] value)

Parameters

value byte[]

Returns

RedisValue

implicit operator RedisValue(double)

Creates a new RedisValue from a Double

public static implicit operator RedisValue(double value)

Parameters

value double

Returns

RedisValue

implicit operator RedisValue(int)

Creates a new RedisValue from an Int32

public static implicit operator RedisValue(int value)

Parameters

value int

Returns

RedisValue

implicit operator RedisValue(long)

Creates a new RedisValue from an Int64

public static implicit operator RedisValue(long value)

Parameters

value long

Returns

RedisValue

implicit operator RedisValue(bool?)

Creates a new RedisValue from a nullable Boolean

public static implicit operator RedisValue(bool? value)

Parameters

value bool?

Returns

RedisValue

implicit operator RedisValue(double?)

Creates a new RedisValue from a nullable Double

public static implicit operator RedisValue(double? value)

Parameters

value double?

Returns

RedisValue

implicit operator RedisValue(int?)

Creates a new RedisValue from a nullable Int32

public static implicit operator RedisValue(int? value)

Parameters

value int?

Returns

RedisValue

implicit operator RedisValue(long?)

Creates a new RedisValue from a nullable Int64

public static implicit operator RedisValue(long? value)

Parameters

value long?

Returns

RedisValue

implicit operator RedisValue(string)

Creates a new RedisValue from a String

public static implicit operator RedisValue(string value)

Parameters

value string

Returns

RedisValue

operator !=(RedisValue, RedisValue)

Indicates whether two RedisValue values are equivalent

public static bool operator !=(RedisValue x, RedisValue y)

Parameters

x RedisValue
y RedisValue

Returns

bool