共用方式為


RevocationAndRenewalInformation 類別

定義

包含需要撤銷和更新之元件的相關資訊。

public ref class RevocationAndRenewalInformation sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RevocationAndRenewalInformation final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RevocationAndRenewalInformation
Public NotInheritable Class RevocationAndRenewalInformation
繼承
Object Platform::Object IInspectable RevocationAndRenewalInformation
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

範例

此範例顯示 ComponentLoadFailedEventHandler。 迴圈會逐一查看失敗的元件。 而且會叫用 RenewSystemComponentsAsync 。 請注意,RevocationAndRenewalInformation 會透過 ComponentLoadFailedEventArgs傳入。

private async void Manager_ComponentLoadFailed(MediaProtectionManager sender, ComponentLoadFailedEventArgs e)
{
    for (var i = 0; i < e.Information.Items.Count; i++)
    {
        Debug.WriteLine('Component Name=' +
                    e.Information.Items[i].Name +
                    "<BR/>");
        Debug.WriteLine('Failure Reason=' +
                    e.Information.Items[i].Reasons.ToString(16) +
                    "<BR/>");
        Debug.WriteLine('Renewal GUID=' +
                    e.Information.Items[i].RenewalId +
                    "<BR/>");
    }



    //  Invoke the revocation               
    var renewalStatus = await ComponentRenewal.RenewSystemComponentsAsync(e.Information);
    Debug.WriteLine("RenewSystemComponentsAsync: " +
                    renewalStatus.ToString() +
                    "<BR/>");

    e.Completion.Complete(false);
}

備註

ComponentLoadFailedEventArgs.Information屬性會傳回這個物件的實例。

屬性

Items

傳回需要使用更新元件撤銷和更新的元件清單。

適用於