Atom10FeedFormatter 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
Atom 1.0 형식과 인스턴스를 직렬화하는 SyndicationFeed 클래스입니다.
public ref class Atom10FeedFormatter : System::ServiceModel::Syndication::SyndicationFeedFormatter, System::Xml::Serialization::IXmlSerializable
public class Atom10FeedFormatter : System.ServiceModel.Syndication.SyndicationFeedFormatter, System.Xml.Serialization.IXmlSerializable
type Atom10FeedFormatter = class
inherit SyndicationFeedFormatter
interface IXmlSerializable
Public Class Atom10FeedFormatter
Inherits SyndicationFeedFormatter
Implements IXmlSerializable
- 상속
- 파생
- 구현
예제
다음 코드는 Atom 1.0을 SyndicationFeed 만들고 직렬화하는 방법을 보여줍니다.
SyndicationFeed feed = new SyndicationFeed("Test Feed", "This is a test feed", new Uri("http://Contoso/testfeed"), "TestFeedID", DateTime.Now);
SyndicationItem item = new SyndicationItem("Test Item", "This is the content for Test Item", new Uri("http://localhost/ItemOne"), "TestItemID", DateTime.Now);
List<SyndicationItem> items = new List<SyndicationItem>();
items.Add(item);
feed.Items = items;
XmlWriter atomWriter = XmlWriter.Create("Atom.xml");
Atom10FeedFormatter atomFormatter = new Atom10FeedFormatter(feed);
atomFormatter.WriteTo(atomWriter);
atomWriter.Close();
Dim feed As SyndicationFeed = New SyndicationFeed("Test Feed", "This is a test feed", New Uri("http:'Contoso/testfeed"), "TestFeedID", DateTime.Now)
Dim item As SyndicationItem = New SyndicationItem("Test Item", "This is the content for Test Item", New Uri("http:'localhost/ItemOne"), "TestItemID", DateTime.Now)
Dim items As List(Of SyndicationItem) = New List(Of SyndicationItem)
items.Add(item)
feed.Items = items
Dim atomWriter As XmlWriter = XmlWriter.Create("Atom.xml")
Dim atomFormatter As Atom10FeedFormatter = New Atom10FeedFormatter(feed)
atomFormatter.WriteTo(atomWriter)
atomWriter.Close()
설명
이 클래스를 사용하여 인스턴스를 SyndicationFeed 직렬화하고 Atom1.0 피드를 나타내는 XML 문서의 인스턴스 SyndicationFeed 를 만듭니다. 클래스 SyndicationFeed 를 파생하고 직렬화하려는 경우 포맷터를 사용합니다 Atom10FeedFormatter<TSyndicationFeed> .
메모
Atom 1.0 사양을 사용하면 날짜 구문에서 소수 자릿수 초를 지정할 수 있습니다. 직렬화 및 역직렬화할 때 WCF 구현은 소수 자릿수 초를 무시합니다.
생성자
| Name | Description |
|---|---|
| Atom10FeedFormatter() |
클래스의 새 인스턴스를 Atom10FeedFormatter 만듭니다. |
| Atom10FeedFormatter(SyndicationFeed) |
지정된 Atom10FeedFormatter 인스턴스를 사용하여 클래스의 SyndicationFeed 새 인스턴스를 만듭니다. |
| Atom10FeedFormatter(Type) |
클래스의 새 인스턴스를 Atom10FeedFormatter 만듭니다. |
속성
| Name | Description |
|---|---|
| DateTimeParser |
문자열 데이터를 .로 변환하는 데 클래스에서 XmlDateTimeData 사용되는 SyndicationFeedFormatter 대리자DateTimeOffset입니다. (다음에서 상속됨 SyndicationFeedFormatter) |
| Feed |
SyndicationFeed 포맷터와 연결된 값을 가져옵니다. (다음에서 상속됨 SyndicationFeedFormatter) |
| FeedType |
파생된 SyndicationFeed 인스턴스는 인스턴스와 Atom10FeedFormatter 연결됩니다. |
| PreserveAttributeExtensions |
serialization 중에 특성 확장을 유지할지 여부를 지정하는 값을 가져오거나 설정합니다. |
| PreserveElementExtensions |
serialization 중에 요소 확장을 유지할지 여부를 지정하는 값을 가져오거나 설정합니다. |
| UriParser |
문자열 입력에서 인스턴스를 SyndicationFeedFormatter 만들기 Uri 위해 클래스에서 사용하는 대리자입니다. (다음에서 상속됨 SyndicationFeedFormatter) |
| Version |
포맷터에서 사용하는 배포 버전을 가져옵니다. |
메서드
명시적 인터페이스 구현
| Name | Description |
|---|---|
| IXmlSerializable.GetSchema() |
메서드를 GetSchema() 구현합니다. |
| IXmlSerializable.ReadXml(XmlReader) |
메서드를 ReadXml(XmlReader) 구현합니다. |
| IXmlSerializable.WriteXml(XmlWriter) |
메서드를 WriteXml(XmlWriter) 구현합니다. |