/// <summary>Load a collection of notes from a tree.</summary>
 /// <remarks>Load a collection of notes from a tree.</remarks>
 /// <param name="reader">
 /// reader to scan the note branch with. This reader may be
 /// retained by the NoteMap for the life of the map in order to
 /// support lazy loading of entries.
 /// </param>
 /// <param name="treeId">the note tree to read.</param>
 /// <returns>the note map read from the tree.</returns>
 /// <exception cref="System.IO.IOException">the repository cannot be accessed through the reader.
 ///     </exception>
 /// <exception cref="NGit.Errors.CorruptObjectException">a tree object is corrupt and cannot be read.
 ///     </exception>
 /// <exception cref="NGit.Errors.IncorrectObjectTypeException">a tree object wasn't actually a tree.
 ///     </exception>
 /// <exception cref="NGit.Errors.MissingObjectException">a reference tree object doesn't exist.
 ///     </exception>
 public static NGit.Notes.NoteMap ReadTree(ObjectReader reader, ObjectId treeId)
 {
     NGit.Notes.NoteMap map = new NGit.Notes.NoteMap(reader);
     map.Load(treeId);
     return(map);
 }
Ejemplo n.º 2
0
		/// <summary>Load a collection of notes from a tree.</summary>
		/// <remarks>Load a collection of notes from a tree.</remarks>
		/// <param name="reader">
		/// reader to scan the note branch with. This reader may be
		/// retained by the NoteMap for the life of the map in order to
		/// support lazy loading of entries.
		/// </param>
		/// <param name="treeId">the note tree to read.</param>
		/// <returns>the note map read from the tree.</returns>
		/// <exception cref="System.IO.IOException">the repository cannot be accessed through the reader.
		/// 	</exception>
		/// <exception cref="NGit.Errors.CorruptObjectException">a tree object is corrupt and cannot be read.
		/// 	</exception>
		/// <exception cref="NGit.Errors.IncorrectObjectTypeException">a tree object wasn't actually a tree.
		/// 	</exception>
		/// <exception cref="NGit.Errors.MissingObjectException">a reference tree object doesn't exist.
		/// 	</exception>
		public static NGit.Notes.NoteMap ReadTree(ObjectReader reader, ObjectId treeId)
		{
			NGit.Notes.NoteMap map = new NGit.Notes.NoteMap(reader);
			map.Load(treeId);
			return map;
		}