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

返回需要使用更新的组件撤消和续订的组件列表。

适用于