LibGit2Sharp.RemoteCallbacks.GitUpdateTipsHandler C# (CSharp) 메소드

GitUpdateTipsHandler() 개인적인 메소드

Handler for libgit2 update_tips callback. Converts values received from libgit2 callback to more suitable types and calls delegate provided by LibGit2Sharp consumer.
private GitUpdateTipsHandler ( IntPtr str, LibGit2Sharp.Core.GitOid &oldId, LibGit2Sharp.Core.GitOid &newId, IntPtr data ) : int
str System.IntPtr IntPtr to string
oldId LibGit2Sharp.Core.GitOid Old reference ID
newId LibGit2Sharp.Core.GitOid New referene ID
data System.IntPtr IntPtr to optional payload passed back to the callback.
리턴 int
        private int GitUpdateTipsHandler(IntPtr str, ref GitOid oldId, ref GitOid newId, IntPtr data)
        {
            UpdateTipsHandler onUpdateTips = UpdateTips;
            bool shouldContinue = true;

            if (onUpdateTips != null)
            {
                string refName = LaxUtf8Marshaler.FromNative(str);
                shouldContinue = onUpdateTips(refName, oldId, newId);
            }

            return Proxy.ConvertResultToCancelFlag(shouldContinue);
        }