public static EnrollCommandArgs GetEnrollCommand(IDSolRequestType request)
 {
     EnrollCommandArgs enrollCommandArgs = new EnrollCommandArgs();
       IDS.IMS.Common.Person person = new IDS.IMS.Common.Person();
       person["EXTERNALID"] = (object) request.PersonId.ToString();
       person["FIRSTNAME"] = (object) request.FirstName;
       person["LASTNAME"] = (object) request.LastName;
       person["GENDER"] = (object) request.Gender;
       IMSUtil.log.Info("DOB: " + (object) request.DateOfBirth);
       person["BIRTHDAY"] = (object) request.DateOfBirth;
       enrollCommandArgs.Person = person;
       enrollCommandArgs.Credentials = TemplateHelper.ITemplateToByteArray((ITemplate) IMSUtil.CreateTemplateFromImages(request));
       return enrollCommandArgs;
 }
 private static CompositeTemplate CreateTemplateFromImages(IDSolRequestType request)
 {
     CompositeTemplate compositeTemplate = new CompositeTemplate();
       compositeTemplate.DataType = EBiometricDataType.Raw;
       for (int index = 0; index < request.FingerPrint.Length; ++index)
       {
     FingerprintTemplate fingerprintTemplate = new FingerprintTemplate();
     fingerprintTemplate.DataType = EBiometricDataType.Raw;
     fingerprintTemplate.Finger = IMSUtil.GetFingerByNumber(request.FingerPrint[index].FingerPosition.Value);
     GenericIdentifier genericIdentifier = new GenericIdentifier();
     byte[] afisReadyBmp = ImageUtil.GetAFISReadyBMP(request.FingerPrint[index].FingerPrintImage);
     genericIdentifier.RawData = afisReadyBmp;
     genericIdentifier.IdentType = new IdentifierType();
     genericIdentifier.IdentType.Type = EBiometricIdentifierType.FingerPrint;
     fingerprintTemplate.Identifier = (IIdentifier) genericIdentifier;
     compositeTemplate.Collection.Add((object) fingerprintTemplate);
       }
       if (request.FaceImage != null)
       {
     IMSUtil.log.Info("Face Image Is Not Null");
     FacialTemplate facialTemplate = new FacialTemplate();
     facialTemplate.DataType = EBiometricDataType.Raw;
     GenericIdentifier genericIdentifier = new GenericIdentifier();
     genericIdentifier.IdentType = new IdentifierType(EBiometricIdentifierType.FacialFeatures);
     genericIdentifier.RawData = request.FaceImage;
     facialTemplate.Identifier = (IIdentifier) genericIdentifier;
     compositeTemplate.Collection.Add((object) facialTemplate);
       }
       return compositeTemplate;
 }
 public static int Enroll(IDSolRequestType request)
 {
     return IMSUtil.client.ExecuteCommand((CommandArgsBase) IMSUtil.GetEnrollCommand(request));
 }
 private static CompositeTemplate CreateFingerprintTemplateFromTemplate(IDSolRequestType request)
 {
     CompositeTemplate compositeTemplate = new CompositeTemplate();
       compositeTemplate.DataType = EBiometricDataType.Processed;
       for (int index = 0; index < request.FingerPrint.Length; ++index)
       {
     FingerprintTemplate fingerprintTemplate = new FingerprintTemplate();
     fingerprintTemplate.DataType = EBiometricDataType.Processed;
     fingerprintTemplate.Finger = IMSUtil.GetFingerByNumber(request.FingerPrint[index].FingerPosition.Value);
     GenericIdentifier genericIdentifier = new GenericIdentifier();
     genericIdentifier.RawData = request.FingerPrint[index].FingerPrintImage;
     genericIdentifier.IdentType = new IdentifierType();
     genericIdentifier.IdentType.Type = EBiometricIdentifierType.FingerPrint;
     fingerprintTemplate.Identifier = (IIdentifier) genericIdentifier;
     compositeTemplate.Collection.Add((object) fingerprintTemplate);
       }
       return compositeTemplate;
 }
 private static FacialTemplate CreateFaceTemplateFromImage(IDSolRequestType request)
 {
     FacialTemplate facialTemplate = new FacialTemplate();
       facialTemplate.DataType = EBiometricDataType.Raw;
       GenericIdentifier genericIdentifier = new GenericIdentifier();
       genericIdentifier.IdentType = new IdentifierType(EBiometricIdentifierType.FacialFeatures);
       genericIdentifier.RawData = request.FaceImage;
       return facialTemplate;
 }
 public static int Identify(IDSolRequestType request)
 {
     return IMSUtil.client.ExecuteCommand((CommandArgsBase) IMSUtil.GetIdentifyCommand(request));
 }
 public static VerifyCommandArgs GetVerifyCommand(IDSolRequestType request)
 {
     return new VerifyCommandArgs()
       {
     ExternalID = request.PersonId,
     Credentials = TemplateHelper.ITemplateToByteArray((ITemplate) IMSUtil.CreateTemplateFromImages(request))
       };
 }
 public static IdentifyCommandArgs GetIdentifyCommand(IDSolRequestType request)
 {
     return new IdentifyCommandArgs()
       {
     Credentials = TemplateHelper.ITemplateToByteArray((ITemplate) IMSUtil.CreateTemplateFromImages(request))
       };
 }