示例#1
0
        public override void PreProcess(IFeatureChain featureChain, FeatureAccount featureAccount, Transaction transaction, FeatureData featureData)
        {
            if (_chainHandler == null)
            {
                _chainHandler = featureChain.GetFeatureChainHandler <GroupChainHandler>(featureData.FeatureId);
            }

            var group     = featureData as Group;
            var groupId   = group.GroupId;
            var index     = group.GroupIndex;
            var groupInfo = _chainHandler.GetGroupInfo(groupId);

            var info = groupInfo.LastTransactionInfo;

            PreviousGroupTransactions.Set(groupId, info.TransactionId);
            GroupTransactionsCount.Set(groupId, info.Count);

            if (index != null)
            {
                info = groupInfo.GetLastGroupIndexTransactionInfo(index, true);

                PreviousGroupIndexTransactions.Set(groupId, index, info.TransactionId);
                GroupIndexTransactionsCount.Set(groupId, info.Count);
            }
        }
示例#2
0
        public override void UpdateMetaData(IFeatureChain featureChain, Transaction transaction, FeatureData featureData)
        {
            if (_chainHandler == null)
            {
                _chainHandler = featureChain.GetFeatureChainHandler <GroupChainHandler>(featureData.FeatureId);
            }

            var group         = featureData as Group;
            var groupId       = group.GroupId;
            var index         = group.GroupIndex;
            var transactionId = transaction.TransactionId;

            group.PreviousGroupTransactionId = PreviousGroupTransactions.Update(groupId, transactionId);
            group.GroupTransactionCount      = GroupTransactionsCount.Increase(groupId);

            if (index != null)
            {
                group.PreviousGroupIndexTransactionId = PreviousGroupIndexTransactions.Update(groupId, index, transactionId);
                group.GroupIndexTransactionCount      = GroupIndexTransactionsCount.Increase(groupId);
            }
        }
示例#3
0
 public GroupQueryHandler(Feature feature, IFeatureChain currentChain) : base(feature, currentChain)
 {
     _handler = currentChain.GetFeatureChainHandler <GroupChainHandler>(FeatureId);
 }