Example #1
0
        public GroupChainHandler(IFeatureChain currentChain, Feature feature) : base(currentChain, feature)
        {
            var groupAdminChainIndex = (uint)currentChain.GetLongOption(FeatureId, GroupFeature.GroupAdministrationChainIndexOption, 0);

            GroupAdministrationChainHandler = CurrentChain.FeatureHost.GetDataChain(groupAdminChainIndex).GetFeatureChainHandler <GroupAdministrationChainHandler>(GroupAdministration.FeatureId);
            if (GroupAdministrationChainHandler == null)
            {
                throw new Exception("_groupAdministrationChainHandler is null");
            }
        }
        public override void PreProcess(IFeatureChain featureChain, FeatureAccount featureAccount, Transaction transaction, FeatureData featureData)
        {
            if (_chainHandler == null)
            {
                _chainHandler = featureChain.GetFeatureChainHandler <GroupAdministrationChainHandler>(featureData.FeatureId);
                _nextGroupId  = _chainHandler.LastGroupId + 1;
            }

            if (transaction.GetFeatureRequest <GroupAdministrationRequest>(out var request))
            {
                var groupId = request.GroupId;
                var group   = _chainHandler.GetGroupInfo(groupId);
                _lastTransactionIdLookup.Set(groupId, group.AdministrationLastTransactionInfo.TransactionId);
            }
        }
Example #3
0
 public GroupValidator(Feature feature, IFeatureChain currentChain) : base(feature, currentChain)
 {
     _chainHandler = CurrentChain.GetFeatureChainHandler <GroupChainHandler>(FeatureId).GroupAdministrationChainHandler;
 }
 public GroupAdministrationQueryHandler(Feature feature, IFeatureChain currentChain) : base(feature, currentChain)
 {
     _handler = currentChain.GetFeatureChainHandler <GroupAdministrationChainHandler>(FeatureId);
 }