public AdTraceSessionFailure(Dictionary <string, string> sessionFailureDataMap) { if (sessionFailureDataMap == null) { return; } Adid = AdTraceUtils.TryGetValue(sessionFailureDataMap, AdTraceUtils.KeyAdid); Message = AdTraceUtils.TryGetValue(sessionFailureDataMap, AdTraceUtils.KeyMessage); Timestamp = AdTraceUtils.TryGetValue(sessionFailureDataMap, AdTraceUtils.KeyTimestamp); bool willRetry; if (bool.TryParse(AdTraceUtils.TryGetValue(sessionFailureDataMap, AdTraceUtils.KeyWillRetry), out willRetry)) { WillRetry = willRetry; } string jsonResponseString = AdTraceUtils.TryGetValue(sessionFailureDataMap, AdTraceUtils.KeyJsonResponse); var jsonResponseNode = JSON.Parse(jsonResponseString); if (jsonResponseNode != null && jsonResponseNode.AsObject != null) { JsonResponse = new Dictionary <string, object>(); AdTraceUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse); } }
public AdTraceAttribution(Dictionary <string, string> dicAttributionData) { if (dicAttributionData == null) { return; } trackerName = AdTraceUtils.TryGetValue(dicAttributionData, AdTraceUtils.KeyTrackerName); trackerToken = AdTraceUtils.TryGetValue(dicAttributionData, AdTraceUtils.KeyTrackerToken); network = AdTraceUtils.TryGetValue(dicAttributionData, AdTraceUtils.KeyNetwork); campaign = AdTraceUtils.TryGetValue(dicAttributionData, AdTraceUtils.KeyCampaign); adgroup = AdTraceUtils.TryGetValue(dicAttributionData, AdTraceUtils.KeyAdgroup); creative = AdTraceUtils.TryGetValue(dicAttributionData, AdTraceUtils.KeyCreative); clickLabel = AdTraceUtils.TryGetValue(dicAttributionData, AdTraceUtils.KeyClickLabel); adid = AdTraceUtils.TryGetValue(dicAttributionData, AdTraceUtils.KeyAdid); }
public AdTraceSessionSuccess(Dictionary <string, string> sessionSuccessDataMap) { if (sessionSuccessDataMap == null) { return; } Adid = AdTraceUtils.TryGetValue(sessionSuccessDataMap, AdTraceUtils.KeyAdid); Message = AdTraceUtils.TryGetValue(sessionSuccessDataMap, AdTraceUtils.KeyMessage); Timestamp = AdTraceUtils.TryGetValue(sessionSuccessDataMap, AdTraceUtils.KeyTimestamp); string jsonResponseString = AdTraceUtils.TryGetValue(sessionSuccessDataMap, AdTraceUtils.KeyJsonResponse); var jsonResponseNode = JSON.Parse(jsonResponseString); if (jsonResponseNode != null && jsonResponseNode.AsObject != null) { JsonResponse = new Dictionary <string, object>(); AdTraceUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse); } }