public PublisherChannelBuilder(
     IPublisherRegistry publisherRegistry, 
     ISerialiser serialiser, 
     ITaskRepeater taskRepeater,
     MessageCacheFactory messageCacheFactory, 
     ISubscriberSendChannelBuilder subscriberChannelBuilder, 
     ISystemTime systemTime, 
     ChangeStore changeStore,
     ICheckpointStrategy checkPointStrategy)
 {
     Contract.Requires(publisherRegistry != null);
     Contract.Requires(serialiser != null);
     Contract.Requires(taskRepeater != null);
     Contract.Requires(messageCacheFactory != null);
     Contract.Requires(subscriberChannelBuilder != null);
     Contract.Requires(systemTime != null);
     Contract.Requires(changeStore != null);
     Contract.Requires(checkPointStrategy != null);
     
     this.publisherRegistry = publisherRegistry;
     this.serialiser = serialiser;
     this.taskRepeater = taskRepeater;
     this.messageCacheFactory = messageCacheFactory;
     this.subscriberChannelBuilder = subscriberChannelBuilder;
     this.systemTime = systemTime;
     this.changeStore = changeStore;
     this.checkPointStrategy = checkPointStrategy;
 }
        public ChangeStoreSelector(ChangeStore durableChangeStore, NullChangeStore nullChangeStore)
        {
            Contract.Requires(durableChangeStore != null);
            Contract.Requires(nullChangeStore != null);

            this.durableChangeStore = durableChangeStore;
            this.nullChangeStore = nullChangeStore;
        }
        protected ChangeRoot(ChangeStore changeStore, ICheckpointStrategy checkpointStrategy)
        {
            Contract.Requires(changeStore != null);
            Contract.Requires(checkpointStrategy != null);

            this.changeStore = changeStore;
            this.checkpointStrategy = checkpointStrategy;
        }
        public TestMessageChangeRebuilder(
            ChangeStore changeStore, 
            EndpointAddress address, 
            PersistenceUseType useType, 
            ICheckpointStrategy checkPointStrategy)
            : base(changeStore, checkPointStrategy)
        {
            Address = address;
            UseType = useType;
            Id = address + "|" + useType;

            this.messages = new List<MessagePayload>();
        }
        public Publisher(
            EndpointAddress address, 
            ISubscriberSendChannelBuilder builder, 
            ChangeStore changeStore,
            ICheckpointStrategy checkPointStrategy)
        {
            Contract.Requires(address != null);
            Contract.Requires(address != EndpointAddress.Empty);
            Contract.Requires(builder != null);
            Contract.Requires(changeStore != null);

            subscribers = new PersistentSubscriberCollection(address, changeStore, builder, checkPointStrategy);
        }
        public ReceiveMessageCache(
            ChangeStore changeStore,
            EndpointAddress address, 
            PersistenceUseType useType,
            ICheckpointStrategy checkPointStrategy)
            : base(changeStore, checkPointStrategy)
        {
            Contract.Requires(changeStore != null);
            Contract.Requires(address != EndpointAddress.Empty);
            
            Address = address;
            UseType = useType;
            Id = address + "|" + useType;

            messages = new ConcurrentDictionary<Guid, MessagePayload>();
            sequence = 1;
        }
 SendMessageCache CreateSendMessageCache(PersistenceUseType useType, EndpointAddress address, ChangeStore changeStore)
 {
     return new SendMessageCache(systemTime, changeStore, address, useType, checkPointStrategy);
 }