public void AddLogItem(LogItem item, LogItemBlobRequest blob = null) { if (blob != null) { mCoData.Add(item, blob); } mItems.Add(item); }
/// <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; }
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; }