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

PatchEntryChanges.cs « LibGit2Sharp - github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0a7d925b7348f1e5816e01fef1c3e8db4aa9fa2a (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
namespace LibGit2Sharp
{
    /// <summary>
    /// Holds the changes between two versions of a file.
    /// </summary>
    public class PatchEntryChanges : ContentChanges
    {
        private readonly TreeEntryChanges treeEntryChanges;

        /// <summary>
        /// Needed for mocking purposes.
        /// </summary>
        protected PatchEntryChanges()
        { }

        internal PatchEntryChanges(bool isBinaryComparison, TreeEntryChanges treeEntryChanges)
            : base(isBinaryComparison)
        {
            this.treeEntryChanges = treeEntryChanges;
        }

        /// <summary>
        /// The new path.
        /// </summary>
        public virtual string Path
        {
            get { return treeEntryChanges.Path; }
        }

        /// <summary>
        /// The new <see cref="Mode"/>.
        /// </summary>
        public virtual Mode Mode
        {
            get { return treeEntryChanges.Mode; }
        }

        /// <summary>
        /// The new content hash.
        /// </summary>
        public virtual ObjectId Oid
        {
            get { return treeEntryChanges.Oid; }
        }

        /// <summary>
        /// The kind of change that has been done (added, deleted, modified ...).
        /// </summary>
        public virtual ChangeKind Status
        {
            get { return treeEntryChanges.Status; }
        }

        /// <summary>
        /// The old path.
        /// </summary>
        public virtual string OldPath
        {
            get { return treeEntryChanges.OldPath; }
        }

        /// <summary>
        /// The old <see cref="Mode"/>.
        /// </summary>
        public virtual Mode OldMode
        {
            get { return treeEntryChanges.OldMode; }
        }

        /// <summary>
        /// The old content hash.
        /// </summary>
        public virtual ObjectId OldOid
        {
            get { return treeEntryChanges.OldOid; }
        }
    }
}