DataRequestDeferral 클래스

정의

대상 앱과 콘텐츠를 비동기적으로 교환할 수 있습니다.

public ref class DataRequestDeferral sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class DataRequestDeferral final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class DataRequestDeferral
Public NotInheritable Class DataRequestDeferral
상속
Object Platform::Object IInspectable DataRequestDeferral
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

이 예제에서는 대상 앱과 이미지 공유의 일부로 DataRequestDeferral 개체를 가져오는 방법을 보여 있습니다.

void DataRequested(DataTransferManager sender, DataRequestedEventArgs e)
{
    DataRequestDeferral deferral = e.Request.GetDeferral();
    e.Request.Data.Properties.Title = "Hello World!";
    e.Request.Data.Properties.Description = "This example shows how to share files and images.";
    if (this.dataPackageThumbnail != null)
    {
        e.Request.Data.Properties.Thumbnail = this.dataPackageThumbnail;
    }
    e.Request.Data.SetBitmap(imageStreamRef);
    deferral.Complete();
}

설명

DataPackagegetDeferral 메서드를 호출하면 DataRequestDeferral 클래스의 instance 가져옵니다.

메서드

Complete()

비동기 공유의 콘텐츠가 대상 앱에 대해 준비되었거나 공유 작업에서 오류가 발생했음을 나타냅니다.

적용 대상