PostSharp4.3/API Reference/Post­Sharp.​Serialization Namespace/Portable­Formatter Class
PortableFormatter Class
A serializer designed to serialize the internal structure of types with support for cyclic object graphs. The PortableFormatter is very similar in function and design to the BinaryFormatter, but is supported on most platforms and does not require full trust. Both formatters have similar usage: SerializableAttribute is replaced by PSerializableAttribute and NonSerializedAttribute by PNonSerializedAttribute.
Inheritance Hierarchy
System.Object
  PostSharp.Serialization.PortableFormatter

Namespace: PostSharp.Serialization
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.48.0 (4.3.48.0)
Syntax
C#
public sealed class PortableFormatter

The PortableFormatter type exposes the following members.

Constructors
  NameDescription
Public methodPortableFormatter
Initializes a new PortableFormatter.
Properties
  NameDescription
Public propertyMetadataDispenser
When deserializing PostSharp aspects, gets the IMetadataDispenser corresponding to the MetadataEmitter used at build time.
Public propertyMetadataEmitter
When serializing PostSharp access, gets or sets a facility that can be used to serialize metadata (System.Reflection) objects as MSIL, therefore making them transparent to obfuscation.
Methods
  NameDescription
Public methodDeserialize
Deserializes a stream.
Public methodSerialize
Serializes an object (and the complete graph whose this object is the root) into a Stream.
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
See Also