共用方式為


AddPackageOptions.ExpectedDigests Property

Definition

Gets a dictionary that maps the URIs associated with an AddPackageOptions with the corresponding digest string.

public:
 property IMap<Uri ^, Platform::String ^> ^ ExpectedDigests { IMap<Uri ^, Platform::String ^> ^ get(); };
IMap<Uri, winrt::hstring const&> ExpectedDigests();
public IDictionary<System.Uri,string> ExpectedDigests { get; }
var iMap = addPackageOptions.expectedDigests;
Public ReadOnly Property ExpectedDigests As IDictionary(Of Uri, String)

Property Value

IMap<Uri,String>

IDictionary<Uri,String>

IMap<Uri,Platform::String>

IMap<Uri,winrt::hstring>

A dictionary where the key is a URI and the value is a string representing the digest associated with the URI.

Remarks

A digest string is a hashed representation of the contents of the package URI. Get the digest for a package URI by calling IAppxDigestProvider::GetDigest and then add the value to the collection returned by ExpectedDigests. Digests may be specified for any or all URIs included in the AddPackageOptions. If a digest is specified for a URI and the content at that URI doesn’t match its digest, the deployment operation will fail. If a digest is not specified for a URI, then the package manager will proceed without validating its digest. If a digest is specified for a URI which the package manager doesn’t need to read, the digest is ignored.

Applies to