语言

你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

SerializationHelpers Class

Definition

Class containing static methods useful for serialization tasks

public class SerializationHelpers
type SerializationHelpers = class
Public Class SerializationHelpers
Inheritance
SerializationHelpers

Constructors

Name Description
SerializationHelpers()

Methods

Name Description
RestoreSentinel(Hashtable)

RestoreSentinel reverses the effect of SetSentinel(Hashtable): any value that was replaced with a DateTime sentinel (Year == 1) is set back to null.

RestoreSentinel(IDictionary<String,Object>)

RestoreSentinel reverses the effect of SetSentinel(IDictionary<String,Object>): any value that was replaced with a DateTime sentinel (Year == 1) is set back to null. Call this after serialization to avoid permanently mutating the in-memory object.

RestoreSentinel(Object[])

RestoreSentinel reverses the effect of SetSentinel(Object[]) on nested dictionaries within an array.

SetSentinel(Hashtable)

SetSentinel methods deep-grovel the given object looking for properties with null values. Every such property is replaced with a DateTime with a Year value of 1. This sentinel value convinces the autorest serializer to serialize a null value.

SetSentinel(IDictionary<String,Object>)

SetSentinel methods deep-grovel the given object looking for properties with null values. Every such property is replaced with a DateTime with a Year value of 1. This sentinel value convinces the autorest serializer to serialize a null value.

SetSentinel(Object[])

SetSentinel methods deep-grovel the given object looking for properties with null values. Every such property is replaced with a DateTime with a Year value of 1. This sentinel value convinces the autorest serializer to serialize a null value.

Applies to