Bewerken

Share via


XmlSyndicationContent.ReadContent Method

Definition

Reads content into the XmlSyndicationContent instance.

Overloads

ReadContent<TContent>()

Reads the content of the specified type into the XmlSyndicationContent.

ReadContent<TContent>(XmlObjectSerializer)

Reads the content of the specified type into the XmlSyndicationContent using the specified serializer.

ReadContent<TContent>(XmlSerializer)

Reads the content of the specified type into the XmlSyndicationContent using the specified serializer.

ReadContent<TContent>()

Source:
XmlSyndicationContent.cs
Source:
XmlSyndicationContent.cs
Source:
XmlSyndicationContent.cs
Source:
XmlSyndicationContent.cs

Reads the content of the specified type into the XmlSyndicationContent.

public:
generic <typename TContent>
 TContent ReadContent();
public TContent ReadContent<TContent> ();
member this.ReadContent : unit -> 'Content
Public Function ReadContent(Of TContent) () As TContent

Type Parameters

TContent

The type of content to read.

Returns

TContent

An object of the specified type.

Exceptions

The input XML cannot be deserialized into the requested type.

Remarks

On the receive/deserialization side, if the XML syndication content element is an empty XML element, then default(TContent) is returned. If not, a new instance of DataContractSerializer is created and is used to deserialize the inner XML of the XML syndication content element into an instance of TContent.

Applies to

ReadContent<TContent>(XmlObjectSerializer)

Source:
XmlSyndicationContent.cs
Source:
XmlSyndicationContent.cs
Source:
XmlSyndicationContent.cs
Source:
XmlSyndicationContent.cs

Reads the content of the specified type into the XmlSyndicationContent using the specified serializer.

public:
generic <typename TContent>
 TContent ReadContent(System::Runtime::Serialization::XmlObjectSerializer ^ dataContractSerializer);
public TContent ReadContent<TContent> (System.Runtime.Serialization.XmlObjectSerializer dataContractSerializer);
member this.ReadContent : System.Runtime.Serialization.XmlObjectSerializer -> 'Content
Public Function ReadContent(Of TContent) (dataContractSerializer As XmlObjectSerializer) As TContent

Type Parameters

TContent

The type of content to read.

Parameters

dataContractSerializer
XmlObjectSerializer

The XmlObjectSerializer to use.

Returns

TContent

An object of the specified type.

Exceptions

The input XML cannot be deserialized into the requested type.

Remarks

On the receive/deserialization side, if the XML syndication content element is an empty XML element, then default(TContent) is returned. If not, the instance of XmlObjectSerializer passed in is used to deserialize the inner XML of XML syndication content element into an instance of TContent.

Applies to

ReadContent<TContent>(XmlSerializer)

Source:
XmlSyndicationContent.cs
Source:
XmlSyndicationContent.cs
Source:
XmlSyndicationContent.cs
Source:
XmlSyndicationContent.cs

Reads the content of the specified type into the XmlSyndicationContent using the specified serializer.

public:
generic <typename TContent>
 TContent ReadContent(System::Xml::Serialization::XmlSerializer ^ serializer);
public TContent ReadContent<TContent> (System.Xml.Serialization.XmlSerializer serializer);
member this.ReadContent : System.Xml.Serialization.XmlSerializer -> 'Content
Public Function ReadContent(Of TContent) (serializer As XmlSerializer) As TContent

Type Parameters

TContent

The type of content to read.

Parameters

serializer
XmlSerializer

The XmlSerializer to use.

Returns

TContent

An object of the specified type.

Exceptions

The input XML cannot be deserialized into the requested type.

Remarks

On the receive/deserialization side, if the XML syndication content element is an empty XML element, then default(TContent) is returned. If not, the instance of XmlSerializer passed in is used to deserialize the inner XML of XML syndication content element into an instance of TContent.

Applies to