public LockFileBasedSemaphore(string name, TimeSpan lockTimeout, ILockIo lockIo, IProcessFinder processFinder, ILog log) { if (string.IsNullOrEmpty(name)) { throw new ArgumentNullException(nameof(name), "name cannot be null or emtpy."); } Name = name; LockTimeout = lockTimeout; LockFilePath = lockIo.GetFilePath(name); this.lockIo = lockIo; this.processFinder = processFinder; this.log = log; }
internal LockFileBasedSemaphore(string name, TimeSpan lockTimeout, ILockIo lockIo, IProcessFinder processFinder) : this(name, lockTimeout, lockIo, processFinder, new LogWrapper()) { }