Edit

Share via


SignatureCollection Class

Definition

Contains a Signature object for each digital signature applied to a form or to a set of signable data represented by a SignedDataBlock object.

public ref class SignatureCollection abstract : System::Collections::IEnumerable
public abstract class SignatureCollection : System.Collections.IEnumerable
type SignatureCollection = class
    interface IEnumerable
Public MustInherit Class SignatureCollection
Implements IEnumerable
Inheritance
SignatureCollection
Implements

Examples

The following example returns the SignatureCollection object that represents the signatures on the first set of signable data, or, if signing is enabled for the entire form, will return the SignatureCollection object for signatures on the entire form.

SignatureCollection block1Signatures = 
   this.SignedDataBlocks[0].Signatures;
Dim block1Signatures As SignatureCollection = 
   Me.SignedDataBlocks(0).Signatures

Remarks

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

The SignatureCollection object for a form or a set of signable data is accessed through the Signatures property of the SignedDataBlock object that represents that set of signable data.

If the form template is configured to enable digital signatures for the entire form, there is only one SignedDataBlock object for all the data in the form, and the SignatureCollection object contains all digital signatures applied to the entire form.

If the form template is configured to enable digital signatures for specific data in the form, there is a SignedDataBlock object for each set of signable data configured in the form template. In this case, each SignedDataBlock object contains the digital signatures applied to the set of signable data that is associated with the SignedDataBlock object.

The SignatureCollection class provides the CreateSignature() method, which creates a Signature object (getting a snapshot of the view plus additional signature information) without adding it to the form. To add this signature to the form, call the Sign() method of the Signature class. You can only call the CreateSignature method from the event handler for the Sign event, which only a fully trusted form template can execute.

The SignatureCollection class also provides the Item[Int32] and Count properties to access and count the Signature objects in the collection.

Constructors

SignatureCollection()

Properties

Count

Gets the number of Signature objects in the collection.

Item[Int32]

Gets a reference to the specified Signature object from the SignatureCollection object.

Methods

CreateSignature()

Creates a new Signature object without adding it to the form.

GetEnumerator()

Gets a System.Collections.IEnumerator object that iterates over all entries in the SignatureCollection object.

Applies to