RecipientFound Event
Fires to report a message addressee parameters.
Syntax
public event OnRecipientFoundHandler OnRecipientFound; public delegate void OnRecipientFoundHandler(object sender, MessagedecryptorRecipientFoundEventArgs e); public class MessagedecryptorRecipientFoundEventArgs : EventArgs { public string IssuerRDN { get; } public byte[] SerialNumber { get; } public byte[] SubjectKeyID { get; } public bool CertFound { get; } }
Public Event OnRecipientFound As OnRecipientFoundHandler Public Delegate Sub OnRecipientFoundHandler(sender As Object, e As MessagedecryptorRecipientFoundEventArgs) Public Class MessagedecryptorRecipientFoundEventArgs Inherits EventArgs Public ReadOnly Property IssuerRDN As String Public ReadOnly Property SerialNumber As Byte() Public ReadOnly Property SubjectKeyID As Byte() Public ReadOnly Property CertFound As Boolean End Class
Remarks
This event is fired for each addressee the message is encrypted for. It may fire several times in a row if the message is encrypted for more than one recipient.
The IssuerRDN, SerialNumber, and SubjectKeyID parameters to identify the recipient's certificate. CertFound indicates if the specified certificate has been located in Certificates collection. If it wasn't, you might want to look up the certificate manually, and add it to the collection inside the event handler.