FormatterTypeStyle Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Formatter-based serialization is obsolete and should not be used.
Indicates the format in which type descriptions are laid out in the serialized stream.
public enum class FormatterTypeStyle
public enum FormatterTypeStyle
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public enum FormatterTypeStyle
[System.Serializable]
public enum FormatterTypeStyle
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum FormatterTypeStyle
type FormatterTypeStyle =
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type FormatterTypeStyle =
[<System.Serializable>]
type FormatterTypeStyle =
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type FormatterTypeStyle =
Public Enum FormatterTypeStyle
- Inheritance
- Attributes
Fields
Name | Value | Description |
---|---|---|
TypesWhenNeeded | 0 | Indicates that types can be stated only for arrays of objects, object members of type Object, and ISerializable non-primitive value types. |
TypesAlways | 1 | Indicates that types can be given to all object members and ISerializable object members. |
XsdString | 2 | Indicates that strings can be given in the XSD format rather than SOAP. No string IDs are transmitted. |
Remarks
The XsdString
and TypesWhenNeeded
settings are meant for high performance serialization between services built on the same version of a particular.NET implementation. These two values do not support VTS (Version Tolerant Serialization) because they intentionally omit type information that VTS uses to skip or add optional fields and properties. You should not use the XsdString
or TypesWhenNeeded
type formats when serializing and deserializing types on a computer running a different version of the .NET implementation than the computer on which the type was serialized. Serializing and deserializing on computers running different versions of a .NET implementation causes the formatter to skip serialization of type information, thus making it impossible for the deserializer to skip optional fields if they are not present in certain types that may exist in the other version of the .NET implementation. If you must use XsdString
or TypesWhenNeeded
in such a scenario, you must provide custom serialization for types that have changed from one version to the other.