public void Set <T>(StmMemory <T> memoryRef, object value, MemoryTuple <T> memoryTuple = null) where T : struct
        {
            if (memoryTuple == null)
            {
                memoryTuple = MemoryTuple <T> .Get((T)value, memoryRef.Version[Imbrication]);
            }
            baseTransaction.Set(memoryRef, value, memoryTuple);
            string log = baseTransaction.Name + " set value to " + memoryRef.ToString() + " value = " + memoryTuple.value;

            if (baseTransaction.ParentTransaction != null)
            {
                log += " parent value = " + baseTransaction.ParentTransaction.GetMemoryTupleValue <T>(memoryRef).value;
            }
            LogAction(log);
        }
コード例 #2
0
 private MemoryTuple GenerateMemoryTuple(IInnerTransactionStmMemory memoryRef, int[] memoryVersion, object memoryValue = null)
 {
     int[] currentMemVersion = null;
     if (memoryVersion == null)
     {
         currentMemVersion = memoryRef.Version;
     }
     if (memoryValue == null)
     {
         return(MemoryTuple.Get(GetTransactionMemoryValue(memoryRef), currentMemVersion));
     }
     else
     {
         return(MemoryTuple.Get(memoryValue, currentMemVersion));
     }
 }