Click or drag to resize
JsonExtensionsWriteNullablePropertyT Method
If the nullable value type is non null, this method will write the property name and the value as a name/value pair. An error will be raised if the value cannot be written as a single JSON token.

Namespace:  RiakClient.Extensions
Assembly:  RiakClient (in RiakClient.dll) Version: f9bb17a3f8ff6940b88010a52f202e3d55fe25c5
Syntax
public static JsonWriter WriteNullableProperty<T>(
	this JsonWriter writer,
	string name,
	Nullable<T> value
)
where T : struct, new()

Parameters

writer
Type: JsonWriter
The JsonWriter to write the property to.
name
Type: SystemString
The name of the property.
value
Type: SystemNullableT
The value of the property, writes a System.Object value.

Type Parameters

T
A nullable value type

Return Value

Type: JsonWriter
The original JsonWriter, not modified but useful for call chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type JsonWriter. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also