RevocationAndRenewalItem 類別

定義

表示正以信任元件撤銷和更新的元件。

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

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);
}

備註

RevocationAndRenewalInformation.Items屬性會傳回這個物件的實例。 此資訊可以傳遞至 ComponentRenewal.RenewSystemComponentsAsync 進行系統處理。

屬性

HeaderHash

傳回要撤銷之元件的標頭雜湊。

Name

傳回正在撤銷之元件的名稱。

PublicKeyHash

傳回元件的公開金鑰雜湊。

Reasons

傳回撤銷元件的原因。

RenewalId

傳回更新物件的 GUID。

適用於