internal static Note BuildFromPtr(NoteHandle note, string @namespace, ObjectId targetObjectId) { ObjectId oid = Proxy.git_note_id(note); string message = Proxy.git_note_message(note); return(new Note(oid, message, targetObjectId, @namespace)); }
/// <summary> /// Gets the <see cref="Note"/> associated with the specified objectId and the specified namespace. /// </summary> public virtual Note this[string @namespace, ObjectId id] { get { Ensure.ArgumentNotNull(id, "id"); Ensure.ArgumentNotNull(@namespace, "@namespace"); string canonicalNamespace = NormalizeToCanonicalName(@namespace); using (NoteHandle noteHandle = Proxy.git_note_read(repo.Handle, canonicalNamespace, id)) { return(noteHandle == null ? null : Note.BuildFromPtr(noteHandle, UnCanonicalizeName(canonicalNamespace), id)); } } }