다음을 통해 공유


Atom10ItemFormatter.WriteTo(XmlWriter) 메서드

정의

SyndicationItem 와 연결된 Atom10ItemFormatter 를 지정된 XmlWriter에 씁니다.

public:
 override void WriteTo(System::Xml::XmlWriter ^ writer);
public override void WriteTo (System.Xml.XmlWriter writer);
override this.WriteTo : System.Xml.XmlWriter -> unit
Public Overrides Sub WriteTo (writer As XmlWriter)

매개 변수

writer
XmlWriter

XmlWriter입니다.

예제

다음 코드에서는 WriteTo.

SyndicationItem item = new SyndicationItem("Test Item", "This is the content for Test Item", new Uri("http://localhost/ItemOne"), "TestItemID", DateTime.Now);

Atom10ItemFormatter atomItemFormatter = new Atom10ItemFormatter(item);
XmlWriter atomWriter = XmlWriter.Create("Atom.xml");
atomItemFormatter.WriteTo(atomWriter);
atomWriter.Close();
Dim item As New SyndicationItem("Test Item", "This is the content for Test Item", New Uri("http://localhost/ItemOne"), "TestItemID", DateTime.Now)

Dim atomItemFormatter As New Atom10ItemFormatter(item)
Dim atomWriter As XmlWriter = XmlWriter.Create("Atom.xml")
atomItemFormatter.WriteTo(atomWriter)
atomWriter.Close()

적용 대상