public ReliableBackgroundOperations( GVFSContext context, Func <CallbackResult> preCallback, Func <TBackgroundOperation, CallbackResult> callback, Func <CallbackResult> postCallback, string databaseName) { this.acquisitionLock = new ReaderWriterLockSlim(); this.persistence = new PersistentDictionary <Guid, TBackgroundOperation>( Path.Combine(context.Enlistment.DotGVFSRoot, databaseName)); this.backgroundOperations = new ConcurrentQueue <TBackgroundOperation>(); this.wakeUpThread = new AutoResetEvent(true); this.context = context; this.preCallback = preCallback; this.callback = callback; this.postCallback = postCallback; }
public ReliableBackgroundOperations( GVFSContext context, Func <CallbackResult> preCallback, Func <TBackgroundOperation, CallbackResult> callback, Func <CallbackResult> postCallback, string databaseName) { this.persistence = new PersistentDictionary <long, TBackgroundOperation>( Path.Combine(context.Enlistment.DotGVFSRoot, databaseName)); this.backgroundOperations = new ConcurrentQueue <TBackgroundOperation>(); this.wakeUpThread = new AutoResetEvent(true); this.context = context; this.preCallback = preCallback; this.callback = callback; this.postCallback = postCallback; this.lastOperationId = UnassignedOperationId; // Enqueue saved oeprations here in the constructor to ensure that this.lastOperationId is // set properly before any new operations are queued this.EnqueueSavedOperations(); }
public abstract bool TryInstallGitCommandHooks(GVFSContext context, string executingDirectory, string hookName, string commandHookPath, out string errorMessage);
public GitStatusCache(GVFSContext context, GitStatusCacheConfig config) : this(context, config.BackoffTime) { }