本文整理汇总了VB.NET中System.Windows.Xps.Packaging.XpsDigSigPartAlteringRestrictions枚举的典型用法代码示例。如果您正苦于以下问题:VB.NET XpsDigSigPartAlteringRestrictions枚举的具体用法?VB.NET XpsDigSigPartAlteringRestrictions怎么用?VB.NET XpsDigSigPartAlteringRestrictions使用的例子?那么恭喜您, 这里精选的枚举代码示例或许可以为您提供帮助。
在下文中一共展示了XpsDigSigPartAlteringRestrictions枚举的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: SignXps
' ------------------------------ SignXps -----------------------------
''' <summary>
''' Signs an XPS document with a given X509 certificate, and if one
''' exists, associates the signature with a given SignatureDefintion
''' spotId GUID.</summary>
''' <param name="xpsDocument">
''' The XPS document to sign.</param>
''' <param name="cert">
''' The X509 certificate to use for signing.</param>
''' <param name="spotId">
''' The nullable spotId GUID of the signature definition.</param>
Public Sub SignXps(xpsDocument As XpsDocument, cert As X509Certificate, spotId? As Guid)
' If there's a SignatureDefinition spotId,
' associate it with the signature.
If spotId IsNot Nothing Then
xpsDocument.SignDigitally(cert, True, XpsDigSigPartAlteringRestrictions.None, spotId.Value)
Else
xpsDocument.SignDigitally(cert, True, XpsDigSigPartAlteringRestrictions.None)
End If
End Sub