private void SendRumPayload(string transactionName, long toleratingSeconds, string fromStep, string toStep, string errorReason = null) { AiStep fStep = ThisModel.GetStep(fromStep); AiStep tStep = ThisModel.GetStep(toStep); double start = (fStep.StartTime.Subtract(new DateTime(1970, 1, 1))).TotalMilliseconds; double end = ((tStep.EndTime == DateTime.MinValue) || (tStep.EndTime < fStep.StartTime)) ? DateTime.Now.Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds : tStep.EndTime.Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds; long duration = (long)(end - start); this.mapExecutor.Rum.SendRumTransaction(transactionName, toleratingSeconds, (long)start, duration, errorReason, false); }
internal void SendRequest(IRestClient client, IRestRequest request) { var response = client.Execute(request).Content; JObject jObject = (JObject)JsonConvert.DeserializeObject(response); if (jObject == null || jObject["data"].ToString() == "[]") { return; } foreach (var item in jObject["data"]) { ThisModel study = JsonConvert.DeserializeObject <ThisModel>(item.ToString()); Mydatas.Add(study); } }