コード例 #1
0
        public FileSystemService(string settingsFile)
        {
            this.settingsFile = settingsFile;
            if (!File.Exists(settingsFile))
            {
                File.Create(settingsFile);
            }

            this.watcher        = new FileSystemWatcher(Path.GetDirectoryName(settingsFile));
            this.watcher.Filter = Path.GetFileName(settingsFile);
            this.queueService   = new ServerQueueService();
        }
コード例 #2
0
        public DocumentCollectorService(string outDir, string settingsFile, string clientsFile)
        {
            this.outDir       = outDir;
            this.settingsFile = settingsFile;

            this.workThread    = new Thread(WorkProcedure);
            this.stopWorkEvent = new ManualResetEvent(false);

            this.queueService    = new ServerQueueService();
            this.xmlService      = new XmlService(clientsFile);
            this.fileService     = new FileSystemService(settingsFile);
            this.documentService = new DocumentsService(outDir);
        }