SerializableErrorWrapper Class

Summary

Wrapper class for [Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.SerializableError](Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.yml) to enable it to be serialized by the xml formatters.

Syntax

public sealed class SerializableErrorWrapper : IXmlSerializable, IUnwrappable

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper

Constructors

Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.SerializableErrorWrapper()
public SerializableErrorWrapper()
SerializableErrorWrapper(Microsoft.AspNet.Mvc.SerializableError)

Initializes a new instance of the [Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper](Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.yml) class.

Arguments:
  • error (Microsoft.AspNet.Mvc.SerializableError) – The [Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.SerializableError](Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.yml) object that needs to be wrapped.
public SerializableErrorWrapper(SerializableError error)

Properties

SerializableError()

Gets the wrapped object which is serialized/deserialized into XML representation.

Return type:Microsoft.AspNet.Mvc.SerializableError
public SerializableError SerializableError { get; }

Methods

Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.GetSchema()
Return type:System.Xml.Schema.XmlSchema
public XmlSchema GetSchema()
ReadXml(System.Xml.XmlReader)

Generates a [Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.SerializableError](Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.yml) object from its XML representation.

Arguments:
  • reader (System.Xml.XmlReader) – The [System.Xml.XmlReader]() stream from which the object is deserialized.
public void ReadXml(XmlReader reader)
Unwrap(System.Type)
Arguments:
  • declaredType (System.Type) –
Return type:

System.Object

public object Unwrap(Type declaredType)
WriteXml(System.Xml.XmlWriter)

Converts the wrapped [Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.SerializableError](Microsoft.AspNet.Mvc.Xml.SerializableErrorWrapper.yml) object into its XML representation.

Arguments:
  • writer (System.Xml.XmlWriter) – The [System.Xml.XmlWriter]() stream to which the object is serialized.
public void WriteXml(XmlWriter writer)