public FileHashComputer(ref ManagedQueue <FileQueueItem> fileQueue, ref ManagedQueue <DbQueueItem> hashQueue) { this.fileQueue = fileQueue; this.hashQueue = hashQueue; activeComputeHashThreads = 0; }
public DB(string dataSource, string initialCatalog, ref ManagedQueue <DbQueueItem> hashQueue) { var connectionString = new SqlConnectionStringBuilder(); connectionString.DataSource = dataSource; connectionString.InitialCatalog = initialCatalog; connectionString.IntegratedSecurity = true; conn = new SqlConnection(connectionString.ToString()); command = new SqlCommand { Connection = conn }; this.hashQueue = hashQueue; }
static void Main(string[] args) { fileQueue = new ManagedQueue <FileQueueItem>(); hashQueue = new ManagedQueue <DbQueueItem>(); DB db = new DB(args[0], args[1], ref hashQueue); db.Connect(); PathScanner pathScanner = new PathScanner(ref fileQueue); pathScanner.StartAsyncScan(args.Skip(3).ToArray()); FileHashComputer hashComputer = new FileHashComputer(ref fileQueue, ref hashQueue); hashComputer.StartAsyncHashComputer(Convert.ToUInt32(args[2])); db.StartAsyncThread(); Console.ReadLine(); }
public PathScanner(ref ManagedQueue <FileQueueItem> fileQueue) { this.fileQueue = fileQueue; }