AjTalk.Transactions.Transaction.RegisterValue C# (CSharp) 메소드

RegisterValue() 공개 메소드

public RegisterValue ( TransactionalValue value ) : void
value TransactionalValue
리턴 void
        public void RegisterValue(TransactionalValue value)
        {
            if (this.values.Contains(value))
                return;
            this.values.Add(value);
        }

Usage Example

예제 #1
0
        public void SetValue(Transaction transaction, object value)
        {
            if (this.transaction != null && this.transaction != transaction)
                throw new InvalidOperationException("Another transaction modified this value");

            foreach (long time in this.committedValues.Keys)
                if (time > transaction.Start)
                    throw new InvalidOperationException("Another transaction modified this value");

            if (this.transaction == null)
                transaction.RegisterValue(this);

            this.transaction = transaction;
            this.value = value;
        }