Expand Minimize
4 out of 9 rated this helpful - Rate this topic

System.Runtime.Serialization Namespace

The System.Runtime.Serialization namespace contains classes that can be used for serializing and deserializing objects. Serialization is the process of converting an object or a graph of objects into a linear sequence of bytes for either storage or transmission to another location. Deserialization is the process of taking in stored information and recreating objects from it.

The ISerializable interface provides a way for classes to control their own serialization behavior. Classes in the System.Runtime.Serialization.Formatters namespace control the actual formatting of various data types encapsulated in the serialized objects.

Formatters that serialize and deserialize objects to and from a particular format can be found in the System.Runtime.Serialization.Formatters namespace.

  ClassDescription
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsCollectionDataContractAttributeWhen applied to a collection type, enables custom specification of the collection item elements. This attribute can be applied only to types that are recognized by the DataContractSerializer as valid, serializable collections.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsContractNamespaceAttributeSpecifies the CLR namespace and XML namespace of the data contract.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsDataContractAttributeSpecifies that the type defines or implements a data contract and is serializable by a serializer, such as the DataContractSerializer. To make their type serializable, type authors must define a data contract for their type.
Public classSupported in .NET for Windows Store appsDataContractResolverProvides a mechanism for dynamically mapping types to and from xsi:type representations during serialization and deserialization.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsDataContractSerializerSerializes and deserializes an instance of a type into an XML stream or document using a supplied data contract. This class cannot be inherited.
Public classSupported in .NET for Windows Store appsDataContractSerializerSettingsSpecifies data contract serializer settings.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsDataMemberAttributeWhen applied to the member of a type, specifies that the member is part of a data contract and is serializable by the DataContractSerializer.
Public classSupported in .NET for Windows Store appsDateTimeFormatSpecifies date-time format options.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsEnumMemberAttributeSpecifies that the field is an enumeration member and should be serialized.
Public classExportOptionsRepresents the options that can be set for an XsdDataContractExporter.
Public classExtensionDataObjectStores data from a versioned data contract that has been extended by adding new members.
Public classFormatterProvides base functionality for the common language runtime serialization formatters.
Public classFormatterConverterRepresents a base implementation of the IFormatterConverter interface that uses the Convert class and the IConvertible interface.
Public classFormatterServicesProvides static methods to aid with the implementation of a Formatter for serialization. This class cannot be inherited.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsIgnoreDataMemberAttributeWhen applied to the member of a type, specifies that the member is not part of a data contract and is not serialized.
Public classImportOptionsRepresents the options that can be set on an XsdDataContractImporter.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsInvalidDataContractExceptionThe exception that is thrown when the DataContractSerializer or NetDataContractSerializer encounters an invalid data contract during serialization and deserialization.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsKnownTypeAttributeSpecifies types that should be recognized by the DataContractSerializer when serializing or deserializing a given type.
Public classNetDataContractSerializerSerializes and deserializes an instance of a type into XML stream or document using the supplied .NET Framework types. This class cannot be inherited.
Public classObjectIDGeneratorGenerates IDs for objects.
Public classObjectManagerKeeps track of objects as they are deserialized.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsOnDeserializedAttributeWhen applied to a method, specifies that the method is called immediately after deserialization of an object in an object graph. The order of deserialization relative to other objects in the graph is non-deterministic.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsOnDeserializingAttributeWhen applied to a method, specifies that the method is called during deserialization of an object in an object graph. The order of deserialization relative to other objects in the graph is non-deterministic.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsOnSerializedAttributeWhen applied to a method, specifies that the method is called after serialization of an object in an object graph. The order of serialization relative to other objects in the graph is non-deterministic.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsOnSerializingAttributeWhen applied to a method, specifies that the method is during serialization of an object in an object graph. The order of serialization relative to other objects in the graph is non-deterministic.
Public classOptionalFieldAttributeSpecifies that a field can be missing from a serialization stream so that the BinaryFormatter and the SoapFormatter does not throw an exception.
Public classSafeSerializationEventArgsProvides data for the SerializeObjectState event.
Public classSerializationBinderAllows users to control class loading and mandate what class to load.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsSerializationExceptionThe exception thrown when an error occurs during serialization or deserialization.
Public classSerializationInfoStores all the data needed to serialize or deserialize an object. This class cannot be inherited.
Public classSerializationInfoEnumeratorProvides a formatter-friendly mechanism for parsing the data in SerializationInfo. This class cannot be inherited.
Public classSerializationObjectManagerManages serialization processes at run time. This class cannot be inherited.
Public classSurrogateSelectorAssists formatters in selection of the serialization surrogate to delegate the serialization or deserialization process to.
Public classSupported by Portable Class LibrarySupported in .NET for Windows Store appsXmlObjectSerializerProvides the base class used to serialize objects as XML streams or documents. This class is abstract.
Public classXmlSerializableServicesContains methods for reading and writing XML.
Public classXPathQueryGeneratorWhen given a class representing a data contract, and metadata representing a member of the contract, produces an XPath query for the member.
Public classXsdDataContractExporterAllows the transformation of a set of .NET Framework types that are used in data contracts into an XML schema file (.xsd).
Public classXsdDataContractImporterAllows the transformation of a set of XML schema files (.xsd) into common language runtime (CLR) types.
  StructureDescription
Public structureSerializationEntryHolds the value, Type, and name of a serialized object.
Public structureSupported by Portable Class LibrarySupported in .NET for Windows Store appsStreamingContextDescribes the source and destination of a given serialized stream, and provides an additional caller-defined context.
  InterfaceDescription
Public interfaceIDataContractSurrogateProvides the methods needed to substitute one type for another by the DataContractSerializer during serialization, deserialization, and export and import of XML schema documents (XSD).
Public interfaceIDeserializationCallbackIndicates that a class is to be notified when deserialization of the entire object graph has been completed. Note that this interface is not called when deserializing with the XmlSerializer (System.Xml.Serialization.XmlSerializer).
Public interfaceIExtensibleDataObjectProvides a data structure to store extra data encountered by the XmlObjectSerializer during deserialization of a type marked with the DataContractAttribute attribute.
Public interfaceIFormatterProvides functionality for formatting serialized objects.
Public interfaceIFormatterConverterProvides the connection between an instance of SerializationInfo and the formatter-provided class best suited to parse the data inside the SerializationInfo.
Public interfaceIObjectReferenceIndicates that the current interface implementer is a reference to another object.
Public interfaceISafeSerializationDataEnables serialization of custom exception data in security-transparent code.
Public interfaceISerializableAllows an object to control its own serialization and deserialization.
Public interfaceISerializationSurrogateImplements a serialization surrogate selector that allows one object to perform serialization and deserialization of another.
Public interfaceISurrogateSelectorIndicates a serialization surrogate selector class.
  EnumerationDescription
Public enumerationSupported in .NET for Windows Store appsEmitTypeInformationSpecifies how often to emit type information.
Public enumerationStreamingContextStatesDefines a set of flags that specifies the source or destination context for the stream during serialization.
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.