public MessageStore(DirectoryInfo workingDirectory)
 {
     this.WorkingDirectory = workingDirectory;
     this.cache            = new StoreCache();
     this.log       = new StoreLogger();
     this.fileStore = new FileStore(workingDirectory);
 }
示例#2
0
        private static MessageStore CreateMessageStore(ILogger logger)
        {
            var fileStore =
                new FileStore(
                    new DirectoryInfo(
                        Environment.CurrentDirectory));
            var cache    = new StoreCache(fileStore, fileStore);
            var log      = new StoreLogger(logger, cache, cache);
            var msgStore = new MessageStore(
                log,
                log,
                fileStore);

            return(msgStore);
        }
        public MessageStore(DirectoryInfo workingDirectory)
        {
            if (workingDirectory == null)
            {
                throw new ArgumentNullException("workingDirectory");
            }
            if (!workingDirectory.Exists)
            {
                throw new ArgumentException("Boo", "workingDirectory");
            }

            this.WorkingDirectory = workingDirectory;
            this.cache            = new StoreCache();
            this.log       = new StoreLogger();
            this.fileStore = new FileStore();
        }