public static void AddNosey(long partitionId, IdGenerator id, EventProcessingConfigContext repo)
        {
            var subscriber = repo.Add(new SubscriberDto
            {
                Id          = id.Next <SubscriberDto>(),
                Disabled    = false,
                Name        = "Nosey",
                PartitionId = partitionId
            });

            var queue = repo.Add(new SubscriberQueueDto
            {
                Id           = id.Next <SubscriberQueueDto>(),
                SubscriberId = subscriber.Id,
                Name         = "subscriber-nosey"
            });

            var catchAnyEventForAddressSubscription = repo.Add(
                new EventSubscriptionDto
            {
                Id           = id.Next <EventSubscriptionDto>(),
                SubscriberId = subscriber.Id
            });

            repo.Add(new EventSubscriptionAddressDto {
                Id = id.Next <EventSubscriptionAddressDto>(),
                EventSubscriptionId = catchAnyEventForAddressSubscription.Id,
                Address             = "0x924442a66cfd812308791872c4b242440c108e19"
            });

            var txHashTracker = repo.Add(new EventHandlerDto
            {
                Id = id.Next <EventHandlerDto>(),
                EventSubscriptionId = catchAnyEventForAddressSubscription.Id,
                HandlerType         = EventHandlerType.Aggregate,
                Order = 1
            });

            repo.Add(new EventAggregatorDto
            {
                EventHandlerId = txHashTracker.Id,
                Source         = AggregatorSource.TransactionHash,
                Destination    = AggregatorDestination.EventSubscriptionState,
                OutputKey      = "AllTransactionHashes",
                Operation      = AggregatorOperation.AddToList
            });

            var blockTracker = repo.Add(new EventHandlerDto
            {
                Id = id.Next <EventHandlerDto>(),
                EventSubscriptionId = catchAnyEventForAddressSubscription.Id,
                HandlerType         = EventHandlerType.Aggregate,
                Order = 2
            });

            repo.Add(new EventAggregatorDto
            {
                EventHandlerId = blockTracker.Id,
                Source         = AggregatorSource.BlockNumber,
                Destination    = AggregatorDestination.EventSubscriptionState,
                OutputKey      = "AllBlockNumbers",
                Operation      = AggregatorOperation.AddToList
            });

            repo.Add(new EventHandlerDto
            {
                Id = id.Next <EventHandlerDto>(),
                EventSubscriptionId = catchAnyEventForAddressSubscription.Id,
                HandlerType         = EventHandlerType.Queue,
                Order             = 2,
                SubscriberQueueId = queue.Id
            });
        }
        public static void AddGeorge(long partitionId, IdGenerator id, EventProcessingConfigContext repo)
        {
            var subscriber = repo.Add(new SubscriberDto
            {
                Id          = id.Next <SubscriberDto>(),
                Disabled    = false,
                Name        = "George",
                PartitionId = partitionId
            });

            var queue = repo.Add(new SubscriberQueueDto
            {
                Id           = id.Next <SubscriberQueueDto>(),
                SubscriberId = subscriber.Id,
                Name         = "subscriber-george"
            });

            var standardContract = repo.Add(
                new SubscriberContractDto
            {
                Id           = id.Next <SubscriberContractDto>(),
                SubscriberId = subscriber.Id,
                Name         = "StandardContract",
                Abi          = StandardContractAbi
            });

            var transferEventSubscription = repo.Add(
                new EventSubscriptionDto
            {
                Id              = id.Next <EventSubscriptionDto>(),
                SubscriberId    = subscriber.Id,
                ContractId      = standardContract.Id,
                EventSignatures = new List <string>(new[] { TransferEventSignature })
            });

            var transferCountHandler = repo.Add(new EventHandlerDto
            {
                Id = id.Next <EventHandlerDto>(),
                EventSubscriptionId = transferEventSubscription.Id,
                HandlerType         = EventHandlerType.Aggregate,
                Order = 1
            });

            repo.Add(new EventAggregatorDto
            {
                Id             = id.Next <EventAggregatorDto>(),
                EventHandlerId = transferCountHandler.Id,
                Destination    = AggregatorDestination.EventSubscriptionState,
                Operation      = AggregatorOperation.Count,
                OutputKey      = "CurrentTransferCount"
            });

            repo.Add(new EventHandlerDto
            {
                Id = id.Next <EventHandlerDto>(),
                EventSubscriptionId = transferEventSubscription.Id,
                HandlerType         = EventHandlerType.Queue,
                Order             = 2,
                SubscriberQueueId = queue.Id
            });
        }
        public static void AddEric(long partitionId, IdGenerator id, EventProcessingConfigContext repo)
        {
            var subscriber = repo.Add(new SubscriberDto
            {
                Id          = id.Next <SubscriberDto>(),
                Disabled    = false,
                Name        = "Eric",
                PartitionId = partitionId
            });

            var contract = repo.Add(new SubscriberContractDto
            {
                Id           = id.Next <SubscriberContractDto>(),
                SubscriberId = subscriber.Id,
                Abi          = StandardContractAbi,
                Name         = "StandardContract"
            });

            var catchAllTransfersSubscription = repo.Add(
                new EventSubscriptionDto
            {
                Id              = id.Next <EventSubscriptionDto>(),
                SubscriberId    = subscriber.Id,
                ContractId      = contract.Id,
                EventSignatures = new List <string>(new [] { TransferEventSignature })
            });

            var ruleHandler = repo.Add(new EventHandlerDto
            {
                Id = id.Next <EventHandlerDto>(),
                EventSubscriptionId = catchAllTransfersSubscription.Id,
                HandlerType         = EventHandlerType.Rule,
                Order = 1
            });

            repo.Add(new EventRuleConfigurationDto
            {
                Id             = id.Next <EventRuleConfigurationDto>(),
                EventHandlerId = ruleHandler.Id,
                Type           = EventRuleType.Modulus,
                Source         = EventRuleSource.EventSubscriptionState,
                SourceKey      = "EventsHandled",
                Value          = "10"
            });

            var queue = repo.Add(new SubscriberQueueDto
            {
                Id           = id.Next <SubscriberQueueDto>(),
                SubscriberId = subscriber.Id,
                Name         = "subscriber-transfer-eric"
            });

            repo.Add(new EventHandlerDto
            {
                Id = id.Next <EventHandlerDto>(),
                EventSubscriptionId = catchAllTransfersSubscription.Id,
                HandlerType         = EventHandlerType.Queue,
                Order             = 2,
                SubscriberQueueId = queue.Id
            });
        }