In This Article

MouseWheelGestureValueSerializer Class

Converts instances of string to and from instances of MouseWheelGesture.

public class MouseWheelGestureValueSerializer : ValueSerializer
Inheritance:
object ValueSerializer object

Constructors

MouseWheelGestureValueSerializer()

Initializes an instance of the class.

public MouseWheelGestureValueSerializer()

Methods

CanConvertFromString(string, IValueSerializerContext)

Determines whether the specified string can be converted to an instance of the type that the implementation of ValueSerializer supports.

public override bool CanConvertFromString(string value, IValueSerializerContext context)
Parameter Type Description
value string

String to evaluate for conversion.

context IValueSerializerContext

Context information that is used for conversion.

Returns

bool:

true if the value can be converted; otherwise, false.

CanConvertToString(object, IValueSerializerContext)

Determines whether the specified object can be converted into a string.

public override bool CanConvertToString(object value, IValueSerializerContext context)
Parameter Type Description
value object

The object to evaluate for conversion.

context IValueSerializerContext

Context information that is used for conversion.

Returns

bool:

true if the value can be converted into a string; otherwise, false.

ConvertFromString(string, IValueSerializerContext)

Converts a string to an instance of the type that the implementation of ValueSerializer supports.

public override object ConvertFromString(string value, IValueSerializerContext context)
Parameter Type Description
value string

The string to convert.

context IValueSerializerContext

Context information that is used for conversion.

Returns

object:

A new instance of the type that the implementation of ValueSerializer supports based on the supplied value.

Exceptions

Type Condition
NotSupportedException

value cannot be converted.

ConvertToString(object, IValueSerializerContext)

Converts the specified object to a string.

public override string ConvertToString(object value, IValueSerializerContext context)
Parameter Type Description
value object

The object to convert into a string.

context IValueSerializerContext

Context information that is used for conversion.

Returns

string:

A string representation of the specified object.

Exceptions

Type Condition
NotSupportedException

value cannot be converted.

Inherited Members