SerializableErrorWrapper Class¶
Wrapper class for Microsoft.AspNetCore.Mvc.Formatters.Xml.SerializableErrorWrapper.SerializableError
to enable it to be serialized by the xml formatters.
- Namespace
Microsoft.AspNetCore.Mvc.Formatters.Xml
- Assemblies
- Microsoft.AspNetCore.Mvc.Formatters.Xml
Syntax¶
[XmlRoot("Error")]
public sealed class SerializableErrorWrapper : IXmlSerializable, IUnwrappable
-
class
Microsoft.AspNetCore.Mvc.Formatters.Xml.
SerializableErrorWrapper
Constructors¶
-
SerializableErrorWrapper
()¶ public SerializableErrorWrapper()
-
SerializableErrorWrapper
(Microsoft.AspNetCore.Mvc.SerializableError) Initializes a new instance of the
Microsoft.AspNetCore.Mvc.Formatters.Xml.SerializableErrorWrapper
class.Arguments: error (Microsoft.AspNetCore.Mvc.SerializableError) – The Microsoft.AspNetCore.Mvc.Formatters.Xml.SerializableErrorWrapper.SerializableError
object that needs to be wrapped.public SerializableErrorWrapper(SerializableError error)
-
Methods¶
-
GetSchema
()¶ Return type: System.Xml.Schema.XmlSchema public XmlSchema GetSchema()
-
ReadXml
(System.Xml.XmlReader)¶ Generates a
Microsoft.AspNetCore.Mvc.Formatters.Xml.SerializableErrorWrapper.SerializableError
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)¶ Return type: System.Object public object Unwrap(Type declaredType)
-
WriteXml
(System.Xml.XmlWriter)¶ Converts the wrapped
Microsoft.AspNetCore.Mvc.Formatters.Xml.SerializableErrorWrapper.SerializableError
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)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.Formatters.Xml.SerializableErrorWrapper.
SerializableError
¶ Gets the wrapped object which is serialized/deserialized into XML representation.
Return type: Microsoft.AspNetCore.Mvc.SerializableError public SerializableError SerializableError { get; }
-