public void FindObjectsInit(List<ObjectAttribute> attributes)
{
if (this._disposed)
throw new ObjectDisposedException(this.GetType().FullName);
CK_ATTRIBUTE[] template = null;
ulong templateLength = 0;
if (attributes != null)
{
templateLength = Convert.ToUInt64(attributes.Count);
template = new CK_ATTRIBUTE[templateLength];
for (int i = 0; i < Convert.ToInt32(templateLength); i++)
template[i] = attributes[i].CkAttribute;
}
CKR rv = _p11.C_FindObjectsInit(_sessionId, template, templateLength);
if (rv != CKR.CKR_OK)
throw new Pkcs11Exception("C_FindObjectsInit", rv);
}