Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PushResult.cs « LibGit2Sharp - github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 35dd59ca1d8c8fcaebeba0369d6e91572584518d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System.Collections.Generic;

namespace LibGit2Sharp
{
    /// <summary>
    ///   Contains the results of a push operation.
    /// </summary>
    public class PushResult
    {
        /// <summary>
        ///   Needed for mocking purposes.
        /// </summary>
        protected PushResult()
        { }

        /// <summary>
        ///   <see cref="PushStatusError"/>s that failed to update.
        /// </summary>
        public virtual IEnumerable<PushStatusError> FailedPushUpdates
        {
            get
            {
                return failedPushUpdates;
            }
        }

        /// <summary>
        ///   Flag indicating if there were errors reported
        ///   when updating references on the remote.
        /// </summary>
        public virtual bool HasErrors
        {
            get
            {
                return failedPushUpdates.Count > 0;
            }
        }

        internal PushResult(List<PushStatusError> failedPushUpdates)
        {
            this.failedPushUpdates = failedPushUpdates ?? new List<PushStatusError>();
        }

        private readonly List<PushStatusError> failedPushUpdates;
    }
}