public void Test() { try { List <Record> rowList = new List <Record>(); List <user_field> user_fields = new List <user_field>(); user_field userfield = new user_field { name = "email", value = "*****@*****.**" }; user_fields.Add(userfield); rowList.Add(new Record(user_fields, firstname: "migual", lastname: "batista")); List <user_field> user_fieldsample = new List <user_field>(); rowList.Add(new Record(null, addressline1: "701 Pine Drift Dr", name: "John Smith", country: "usa")); input input = new input(); input.RecordList = rowList; CheckGlobalWatchListAPIRequest request = new CheckGlobalWatchListAPIRequest(input); CheckGlobalWatchListAPIResponse response = identifyRiskService.CheckGlobalWatchList(request); Assert.IsInstanceOfType(response, typeof(CheckGlobalWatchListAPIResponse)); string output = Utility.ObjectToJson <CheckGlobalWatchListAPIResponse>(response); Debug.WriteLine(output); } catch (Exception e) { Assert.Fail("Unexpected Exception"); } }
/// <summary> /// Workflows the completed callback. /// </summary> /// <param name="results">The results.</param> void WorkflowCompletedCallbackCheckGlobalWatchList(IAsyncResult results) { AsyncResult result = (AsyncResult)results; processAPIRequestDelegate <CheckGlobalWatchListAPIResponse> del = (processAPIRequestDelegate <CheckGlobalWatchListAPIResponse>)result.AsyncDelegate; WebResponseEventArgs <CheckGlobalWatchListAPIResponse> webResponceEventArgs; try { Debug.WriteLine(" CheckGlobalWatchList SDK Asynchronous function called "); CheckGlobalWatchListAPIResponse Response = del.EndInvoke(results); webResponceEventArgs = new WebResponseEventArgs <CheckGlobalWatchListAPIResponse>(Response, null); IdentifyAPIRequestFinishedEvent.Invoke(this, webResponceEventArgs); } catch (SdkException sdkException) { webResponceEventArgs = new WebResponseEventArgs <CheckGlobalWatchListAPIResponse>(null, sdkException); IdentifyAPIRequestFinishedEvent.Invoke(this, webResponceEventArgs); Trace.WriteLine(sdkException.Message); } }