コード例 #1
0
        /// <summary>
        /// Asynchronously updates an existing log record using data from the specified <see cref="ActivityDataLog" />.
        /// </summary>
        /// <param name="dataLog">The <see cref="ActivityDataLog" />.</param>
        /// <exception cref="ArgumentNullException"><paramref name="dataLog" /> is null.</exception>
        public void UpdateAsync(ActivityDataLog dataLog)
        {
            if (dataLog == null)
            {
                throw new ArgumentNullException(nameof(dataLog));
            }

            LogTableDefinition table  = DataLogTranslator.BuildTableDefinition(dataLog);
            LogTableRecord     record = DataLogTranslator.BuildUpdateRecord(dataLog);

            Task.Factory.StartNew(() => Update(table, record));
        }
コード例 #2
0
        /// <summary>
        /// Updates an existing log record using data from the specified <see cref="ActivityDataLog" />.
        /// </summary>
        /// <param name="dataLog">The <see cref="ActivityDataLog" />.</param>
        /// <returns><c>true</c> if update was successful, <c>false</c> otherwise.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="dataLog" /> is null.</exception>
        public bool Update(ActivityDataLog dataLog)
        {
            if (dataLog == null)
            {
                throw new ArgumentNullException(nameof(dataLog));
            }

            LogTableDefinition table  = DataLogTranslator.BuildTableDefinition(dataLog);
            LogTableRecord     record = DataLogTranslator.BuildUpdateRecord(dataLog);

            return(Update(table, record));
        }