Exemplo n.º 1
0
        public TransactionToken CreateToken(Guid tokenId)
        {
            TransactionToken newToken = new TransactionToken(tokenId);

            _transactionTokens[newToken.TokenId] = newToken;

            return(newToken);
        }
Exemplo n.º 2
0
        public TransactionToken CreateToken(Guid tokenId)
        {
            TransactionToken newToken = new TransactionToken(tokenId);

            _transactionTokens[newToken.TokenId] = newToken;

            return newToken;
        }
Exemplo n.º 3
0
        internal void Refresh(TransactionToken token)
        {
            MapObjectId = token.MapObjectId;

            if (token.DelayedExecutionMapObjectId != null)
            {
                DelayedExecutionMapObjectId = token.DelayedExecutionMapObjectId;
            }
        }
Exemplo n.º 4
0
        internal void Refresh(TransactionToken token)
        {
            MapObjectId = token.MapObjectId;

            if (token.DelayedExecutionMapObjectId != null)
            {
                DelayedExecutionMapObjectId = token.DelayedExecutionMapObjectId;
            }
        }
        protected SqlCommand CreateDescriptor(out Guid newDescriptorUid, SoapDescriptorType descriptorType, TransactionToken nodeUid, Guid relationshipUid)
        {
            SqlCommand createDescriptorCommand = new SqlCommand();
            createDescriptorCommand.CommandText = "INSERT INTO dbo.[Descriptors] (DescriptorUid, DescriptorTypeUid, NodeUid, RelationshipUid) VALUES (@DescriptorUid, @DescriptorTypeUid, @NodeUid, @RelationshipUid)";
            createDescriptorCommand.Connection = Connection;

            newDescriptorUid = Guid.NewGuid();

            createDescriptorCommand.Parameters.AddWithValue("@DescriptorUid", newDescriptorUid);
            createDescriptorCommand.Parameters.AddWithValue("@DescriptorTypeUid", descriptorType.Id);
            createDescriptorCommand.Parameters.AddWithValue("@NodeUid", nodeUid.GetValue());
            createDescriptorCommand.Parameters.AddWithValue("@RelationshipUid", relationshipUid);

            return createDescriptorCommand;
        }
Exemplo n.º 6
0
        public override void ExecuteOperation()
        {
            if (!ExecuteDomainExistsQuery())
            {
                CreateDomainCommand().ExecuteNonQuery();
            }

            Guid newNodeId = Guid.Empty;

            CreateNodeCommand(out newNodeId).ExecuteNonQuery();

            TransactionToken token = NewNodeToken;

            token.DelayedExecutionMapObjectId = newNodeId;

            //ResultTokens.Add(token);
        }
Exemplo n.º 7
0
        public TransactionToken ProcessToken(TransactionToken token)
        {
            if (_transactionTokens.ContainsKey(token.TokenId))
            {
                if (_transactionTokens[token.TokenId] == token)
                {
                    return(token);
                }
                else
                {
                    _transactionTokens[token.TokenId].Refresh(token);

                    return(_transactionTokens[token.TokenId]);
                }
            }
            else
            {
                return(_transactionTokens[token.TokenId] = token);
            }
        }
Exemplo n.º 8
0
        public TransactionToken ProcessToken(TransactionToken token)
        {
            if (_transactionTokens.ContainsKey(token.TokenId))
            {
                if (_transactionTokens[token.TokenId] == token)
                {
                    return token;
                }
                else
                {
                    _transactionTokens[token.TokenId].Refresh(token);

                    return _transactionTokens[token.TokenId];
                }
            }
            else
            {
                return _transactionTokens[token.TokenId] = token;
            }
        }
Exemplo n.º 9
0
        protected SqlCommand CreateDescriptor(out Guid newDescriptorUid, SoapDescriptorType descriptorType, TransactionToken nodeUid, Guid relationshipUid)
        {
            SqlCommand createDescriptorCommand = new SqlCommand();

            createDescriptorCommand.CommandText = "INSERT INTO dbo.[Descriptors] (DescriptorUid, DescriptorTypeUid, NodeUid, RelationshipUid) VALUES (@DescriptorUid, @DescriptorTypeUid, @NodeUid, @RelationshipUid)";
            createDescriptorCommand.Connection  = Connection;

            newDescriptorUid = Guid.NewGuid();

            createDescriptorCommand.Parameters.AddWithValue("@DescriptorUid", newDescriptorUid);
            createDescriptorCommand.Parameters.AddWithValue("@DescriptorTypeUid", descriptorType.Id);
            createDescriptorCommand.Parameters.AddWithValue("@NodeUid", nodeUid.GetValue());
            createDescriptorCommand.Parameters.AddWithValue("@RelationshipUid", relationshipUid);

            return(createDescriptorCommand);
        }