Esempio n. 1
0
        public Task PurgeAndRecordLogEvent([FromBody] LogEventsModel logEvents)
        {
            var command = LogEventReceived.Purge(_context.DeviceId);

            if (logEvents != null)
            {
                command = LogEventReceived.HavingDetails(
                    _context.DeviceId,
                    logEvents,
                    purgeExisting: true);
            }

            return(_messagingSrv.SendAsync(command));
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a command containing a set of log events for a device.
 /// </summary>
 /// <param name="logEvents">Device log events.</param>
 /// <param name="purgeExisting">Indicates that any existing events associated with
 /// the device should be deleted before inserting the new events.</param>
 /// <returns>Created command.</returns>
 public static LogEventReceived HavingDetails(Guid deviceId, LogEventsModel logEvents,
                                              bool purgeExisting = false) =>
Esempio n. 3
0
        public Task RecordLogEvent([FromBody] LogEventsModel logEvents)
        {
            var command = LogEventReceived.HavingDetails(_context.DeviceId, logEvents);

            return(_messagingSrv.SendAsync(command));
        }