/// <summary> /// Asynchronously submits the specified <see cref="ActivityDataLog" /> as a new log record. /// </summary> /// <param name="dataLog">The <see cref="ActivityDataLog" />.</param> /// <exception cref="ArgumentNullException"><paramref name="dataLog" /> is null.</exception> public void SubmitAsync(ActivityDataLog dataLog) { if (dataLog == null) { throw new ArgumentNullException(nameof(dataLog)); } LogTableDefinition table = DataLogTranslator.BuildTableDefinition(dataLog); LogTableRecord record = DataLogTranslator.BuildInsertRecord(dataLog); Task.Factory.StartNew(() => Submit(table, record)); }
/// <summary> /// Submits the specified <see cref="ActivityDataLog" /> as a new log record. /// </summary> /// <param name="dataLog">The <see cref="ActivityDataLog" />.</param> /// <returns><c>true</c> if submission was successful, <c>false</c> otherwise.</returns> /// <exception cref="ArgumentNullException"><paramref name="dataLog" /> is null.</exception> public bool Submit(ActivityDataLog dataLog) { if (dataLog == null) { throw new ArgumentNullException(nameof(dataLog)); } LogTableDefinition table = DataLogTranslator.BuildTableDefinition(dataLog); LogTableRecord record = DataLogTranslator.BuildInsertRecord(dataLog); return(Submit(table, record)); }