diff options
author | Jameson Miller <jamill@microsoft.com> | 2013-02-04 20:15:20 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-02-05 02:04:01 +0400 |
commit | 72f2f3563482762a64fd6f3c62cf77a878b17c74 (patch) | |
tree | 4e9d72b5f0cc59bfbb7e60ef1460860743a8c9fa /LibGit2Sharp/PushResult.cs | |
parent | c478d49ffa12b4b73cab4400a9595923dc0fb553 (diff) |
Initial push implementation
Diffstat (limited to 'LibGit2Sharp/PushResult.cs')
-rw-r--r-- | LibGit2Sharp/PushResult.cs | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/LibGit2Sharp/PushResult.cs b/LibGit2Sharp/PushResult.cs new file mode 100644 index 00000000..11cba26d --- /dev/null +++ b/LibGit2Sharp/PushResult.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +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 List<PushStatusError> failedPushUpdates; + } +} |