A TagAnnotation
Inheritance: GitObject
Example #1
0
        internal static GitObject CreateFromPtr(IntPtr obj, ObjectId id, Repository repo)
        {
            try
            {
                GitObjectType type = NativeMethods.git_object_type(obj);
                switch (type)
                {
                case GitObjectType.Commit:
                    return(Commit.BuildFromPtr(obj, id, repo));

                case GitObjectType.Tree:
                    return(Tree.BuildFromPtr(obj, id, repo));

                case GitObjectType.Tag:
                    return(TagAnnotation.BuildFromPtr(obj, id, repo));

                case GitObjectType.Blob:
                    return(Blob.BuildFromPtr(obj, id, repo));

                default:
                    throw new LibGit2Exception(string.Format(CultureInfo.InvariantCulture, "Unexpected type '{0}' for object '{1}'.", type, id));
                }
            }
            finally
            {
                NativeMethods.git_object_close(obj);
            }
        }
Example #2
0
 public TagAnnotationVertex(TagAnnotation tagAnnotation)
     : base(tagAnnotation)
 {
     Message = tagAnnotation.Message;
 }