using System.Runtime.InteropServices; using LibGit2Sharp.Core; namespace LibGit2Sharp { /// /// As single entry of a /// a describes one single update on a particular reference /// public class ReflogEntry { private readonly ObjectId _from; private readonly ObjectId _to; private readonly Signature _commiter; private readonly string message; /// /// Needed for mocking purposes. /// protected ReflogEntry() { } /// /// Initializes a new instance of the class. /// /// a to the reflog entry public ReflogEntry(SafeHandle entryHandle) { _from = Proxy.git_reflog_entry_id_old(entryHandle); _to = Proxy.git_reflog_entry_id_new(entryHandle); _commiter = Proxy.git_reflog_entry_committer(entryHandle); message = Proxy.git_reflog_entry_message(entryHandle); } /// /// targeted before the reference update described by this /// public virtual ObjectId From { get { return _from; } } /// /// targeted after the reference update described by this /// public virtual ObjectId To { get { return _to; } } /// /// of the commiter of this reference update /// public virtual Signature Commiter { get { return _commiter; } } /// /// the message assiocated to this reference update /// public virtual string Message { get { return message; } } } }