Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.SQLiteEventStore.IncrementDeliveryAttempt C# (CSharp) Метод

IncrementDeliveryAttempt() публичный Метод

Increments the delivery attempt.
public IncrementDeliveryAttempt ( List rowIds ) : bool
rowIds List Row identifiers.
Результат bool
        public bool IncrementDeliveryAttempt(List<string> rowIds)
        {
            bool success = false;
            lock (_lock)
            {
                try
                {
                    connection = new SqliteConnection("URI=file:" + this.DBfileFullPath);
                    connection.Open();
                    string ids = "'" + String.Join("', '", rowIds.ToArray()) + "'";
                    string query = String.Format("UPDATE " + TABLE_NAME + " SET " + EVENT_DELIVERY_ATTEMPT_COUNT_COLUMN_NAME + "= " + EVENT_DELIVERY_ATTEMPT_COUNT_COLUMN_NAME + "+1 WHERE " + EVENT_ID_COLUMN_NAME + " IN ({0})", ids);
                    using (var command = connection.CreateCommand())
                    {
                        command.CommandText = query;
                        command.ExecuteNonQuery();
                    }
                }
                finally
                {
                    if (connection != null)
                    {
                        connection.Close();
                        connection.Dispose();
                    }

                }
                return success;
            }
        }