Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Sealed class: RT.Serialization.ClassifyIgnoreIfDefaultAttribute

Summary

If this attribute is used on a field or automatically-implemented property, Classify omits its serialization if the value is null, 0, false, etc. If it is used on a type, it applies to all fields and automatically-implemented properties in the type. See also remarks.

Remarks

  • Using this together with ClassifyIgnoreIfEmptyAttribute will cause the distinction between null and an empty collection to be lost. However, a collection containing only null elements is persisted correctly.
  • Do not use this custom attribute on a field that has a non-default value set in the containing class’s constructor. Doing so will cause a serialized null/0/false value to revert to that constructor value upon deserialization.

Constructors

Creates a new instance of ClassifyIgnoreIfDefaultAttribute.