예제 #1
0
        public bool TryEnqueue(GitMaintenanceStep step)
        {
            try
            {
                lock (this.queueLock)
                {
                    if (this.queue == null)
                    {
                        return(false);
                    }

                    this.queue.Add(step);
                    return(true);
                }
            }
            catch (InvalidOperationException)
            {
                // We called queue.CompleteAdding()
            }

            return(false);
        }
예제 #2
0
 public void EnqueueOneTimeStep(GitMaintenanceStep step)
 {
     this.queue.TryEnqueue(step);
 }
예제 #3
0
 /// <summary>
 /// This method is public for test purposes only.
 /// </summary>
 public bool EnlistmentRootReady()
 {
     return(GitMaintenanceStep.EnlistmentRootReady(this.context));
 }