Esempio n. 1
0
        /*unsafe static void WriteDecimal(decimal d, byte[] buffer, int bufferOffset)
         * {
         *
         * }*/

        private static OperationType MapType(TableUpdateAction action)
        {
            switch (action)
            {
            case TableUpdateAction.Add:
                return(OperationType.Add);

            case TableUpdateAction.Update:
                return(OperationType.Update);

            case TableUpdateAction.Delete:
                return(OperationType.Delete);

            default:
                throw new ArgumentOutOfRangeException("action");
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Create new table update
 /// </summary>
 /// <param name="action"></param>
 /// <param name="rowIndex"></param>
 /// <param name="column"></param>
 public TableUpdate(TableUpdateAction action, int rowIndex, IReactiveColumn column = (IReactiveColumn)null)
 {
     _action   = action;
     _rowIndex = rowIndex;
     _column   = column;
 }
Esempio n. 3
0
 /// <summary>
 /// Whether this change only affects one or more columns, but not the whole row.
 /// </summary>
 /// <param name="action"></param>
 /// <returns></returns>
 public static bool IsColumnUpdate(TableUpdateAction action)
 {
     return(action == TableUpdateAction.Update);
 }
Esempio n. 4
0
 /// <summary>
 /// Whether this change affects the whole row
 /// </summary>
 /// <param name="action"></param>
 /// <returns></returns>
 public static bool IsRowUpdate(TableUpdateAction action)
 {
     return(action == TableUpdateAction.Add || action == TableUpdateAction.Delete);
 }
Esempio n. 5
0
 private static void CheckRowUpdate(RowUpdateHandler rowUpdates, int rowIndex, int updateIndex, TableUpdateAction updateType)
 {
     Assert.AreEqual(rowIndex, rowUpdates.RowUpdates[updateIndex].RowIndex);
     Assert.AreEqual(updateType, rowUpdates.RowUpdates[updateIndex].Action);
 }