示例#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));
 }