AtomPubClient.RetrieveFeedAsync(Uri) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 URI에서 배포 피드를 다운로드하는 비동기 작업을 시작합니다. 이 메서드는 SyndicationFormat 에 지정된 형식 중 하나일 수 있는 피드 문자열에서 SyndicationFeed 개체를 인스턴스화합니다.
public:
virtual IAsyncOperationWithProgress<SyndicationFeed ^, RetrievalProgress> ^ RetrieveFeedAsync(Uri ^ uri) = RetrieveFeedAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperationWithProgress<SyndicationFeed, RetrievalProgress> RetrieveFeedAsync(Uri const& uri);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperationWithProgress<SyndicationFeed,RetrievalProgress> RetrieveFeedAsync(System.Uri uri);
function retrieveFeedAsync(uri)
Public Function RetrieveFeedAsync (uri As Uri) As IAsyncOperationWithProgress(Of SyndicationFeed, RetrievalProgress)
매개 변수
반환
작업의 결과를 포함합니다.
구현
M:Windows.Web.Syndication.ISyndicationClient.RetrieveFeedAsync(Windows.Foundation.Uri)
M:Windows.Web.Syndication.ISyndicationClient.RetrieveFeedAsync(System.Uri)
- 특성
예제
다음 코드는 AtomPubClient를 사용하여 특정 서비스 주소에서 피드를 검색하는 방법을 보여 줍니다. AtomPub를 사용하여 피드 콘텐츠를 관리하는 방법에 대한 추가 예제를 보려면 AtomPub 샘플을 다운로드합니다.
function retieveFeed() {
try {
// Refresh client in case server url or credential have changed.
createClient();
// Note that this feed is public by default and will not require authentication.
// We will only get back a limited use feed, without information about editing.
var resourceUri = new Windows.Foundation.Uri(document.getElementById("serviceAddressField").value.trim() + defaultFeedUri);
outputField.innerHTML = "Fetching resource: " + resourceUri.absoluteUri + "/br";
client.retrieveFeedAsync(resourceUri).done(function (feed) {
currentFeed = feed;
currentItemIndex = 0;
outputField.innerHTML += "Complete</br>";
displayCurrentItem();
}, onError);
}
catch (ex) {
outputField.innerHTML += "Exception:" + ex + "</br>";
}
}