コード例 #1
0
 public void AddLogItem(LogItem item, LogItemBlobRequest blob = null)
 {
     if (blob != null)
     {
         mCoData.Add(item, blob);
     }
     mItems.Add(item);
 }
コード例 #2
0
 /// <summary>
 /// Create new pre-filled LogItem
 /// </summary>
 /// <returns></returns>
 internal static Model.LogItem CreateLogItem()
 {
     LogItem li = new LogItem();
     li.DeviceID = _self._deviceID != null ? (int)_self._deviceID : 0;
     li.Application = _self._appName;
     li.AppVersion = _self._appVersion;
     li.Date = DateTime.Now;
     return li;
 }
コード例 #3
0
 public Respond<LogItem> SendItem(LogItem item)
 {
     string json = JsonConvert.SerializeObject(item, RemoteLog.Settings);
     string response = SendRequest(json, URL + LOGS_URL, HTTP_POST);
     Respond<LogItem> r = JsonConvert.DeserializeObject<Respond<LogItem>>(response, RemoteLog.Settings);
     return r;
 }