当前位置: 首页>>代码示例>>C#>>正文


C# Repository.NewObjectReader方法代码示例

本文整理汇总了C#中Repository.NewObjectReader方法的典型用法代码示例。如果您正苦于以下问题:C# Repository.NewObjectReader方法的具体用法?C# Repository.NewObjectReader怎么用?C# Repository.NewObjectReader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Repository的用法示例。


在下文中一共展示了Repository.NewObjectReader方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Merger

		/// <summary>Create a new merge instance for a repository.</summary>
		/// <remarks>Create a new merge instance for a repository.</remarks>
		/// <param name="local">the repository this merger will read and write data on.</param>
		protected internal Merger(Repository local)
		{
			db = local;
			reader = db.NewObjectReader();
			walk = new RevWalk(reader);
		}
开发者ID:nocache,项目名称:monodevelop,代码行数:9,代码来源:Merger.cs

示例2: ObjectWalk

		/// <summary>Create a new revision and object walker for a given repository.</summary>
		/// <remarks>Create a new revision and object walker for a given repository.</remarks>
		/// <param name="repo">the repository the walker will obtain data from.</param>
		public ObjectWalk(Repository repo) : this(repo.NewObjectReader())
		{
		}
开发者ID:LunarLanding,项目名称:ngit,代码行数:6,代码来源:ObjectWalk.cs

示例3: WalkFetchConnection

		internal WalkFetchConnection(WalkTransport t, WalkRemoteObjectDatabase w)
		{
			NGit.Transport.Transport wt = (NGit.Transport.Transport)t;
			local = wt.local;
			objCheck = wt.IsCheckFetchedObjects() ? new ObjectChecker() : null;
			inserter = local.NewObjectInserter();
			reader = local.NewObjectReader();
			remotes = new AList<WalkRemoteObjectDatabase>();
			remotes.AddItem(w);
			unfetchedPacks = new List<WalkFetchConnection.RemotePack>();
			packsConsidered = new HashSet<string>();
			noPacksYet = new List<WalkRemoteObjectDatabase>();
			noPacksYet.AddItem(w);
			noAlternatesYet = new List<WalkRemoteObjectDatabase>();
			noAlternatesYet.AddItem(w);
			fetchErrors = new Dictionary<ObjectId, IList<Exception>>();
			packLocks = new AList<PackLock>(4);
			revWalk = new RevWalk(reader);
			revWalk.SetRetainBody(false);
			treeWalk = new TreeWalk(reader);
			COMPLETE = revWalk.NewFlag("COMPLETE");
			IN_WORK_QUEUE = revWalk.NewFlag("IN_WORK_QUEUE");
			LOCALLY_SEEN = revWalk.NewFlag("LOCALLY_SEEN");
			localCommitQueue = new DateRevQueue();
			workQueue = new List<ObjectId>();
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:26,代码来源:WalkFetchConnection.cs

示例4: CheckoutEntry

        /// <summary>
        /// Updates the file in the working tree with content and mode from an entry
        /// in the index.
        /// </summary>
        /// <remarks>
        /// Updates the file in the working tree with content and mode from an entry
        /// in the index. The new content is first written to a new temporary file in
        /// the same directory as the real file. Then that new file is renamed to the
        /// final filename. Use this method only for checkout of a single entry.
        /// Otherwise use
        /// <code>checkoutEntry(Repository, File f, DirCacheEntry, ObjectReader)</code>
        /// instead which allows to reuse one
        /// <code>ObjectReader</code>
        /// for multiple
        /// entries.
        /// <p>
        /// TODO: this method works directly on File IO, we may need another
        /// abstraction (like WorkingTreeIterator). This way we could tell e.g.
        /// Eclipse that Files in the workspace got changed
        /// </p>
        /// </remarks>
        /// <param name="repository"></param>
        /// <param name="f">
        /// the file to be modified. The parent directory for this file
        /// has to exist already
        /// </param>
        /// <param name="entry">the entry containing new mode and content</param>
        /// <exception cref="System.IO.IOException">System.IO.IOException</exception>
        public static void CheckoutEntry(Repository repository, FilePath f, DirCacheEntry
			 entry)
        {
            ObjectReader or = repository.NewObjectReader();
            try
            {
                CheckoutEntry(repository, f, entry, repository.NewObjectReader());
            }
            finally
            {
                or.Release();
            }
        }
开发者ID:stinos,项目名称:ngit,代码行数:41,代码来源:DirCacheCheckout.cs

示例5: Read

		/// <exception cref="NGit.Errors.MissingObjectException"></exception>
		/// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception>
		/// <exception cref="System.IO.IOException"></exception>
		private static byte[] Read(Repository db, AnyObjectId blobId)
		{
			ObjectReader or = db.NewObjectReader();
			try
			{
				return Read(or, blobId);
			}
			finally
			{
				or.Release();
			}
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:15,代码来源:BlobBasedConfig.cs

示例6: NameConflictTreeWalk

		/// <summary>Create a new tree walker for a given repository.</summary>
		/// <remarks>Create a new tree walker for a given repository.</remarks>
		/// <param name="repo">the repository the walker will obtain data from.</param>
		public NameConflictTreeWalk(Repository repo) : this(repo.NewObjectReader())
		{
		}
开发者ID:LunarLanding,项目名称:ngit,代码行数:6,代码来源:NameConflictTreeWalk.cs

示例7: NoteMapMerger

		/// <summary>
		/// Constructs a NoteMapMerger with custom
		/// <see cref="NoteMerger">NoteMerger</see>
		/// and custom
		/// <see cref="NGit.Merge.MergeStrategy">NGit.Merge.MergeStrategy</see>
		/// .
		/// </summary>
		/// <param name="db">Git repository</param>
		/// <param name="noteMerger">note merger for merging conflicting changes on a note</param>
		/// <param name="nonNotesMergeStrategy">merge strategy for merging non-note entries</param>
		public NoteMapMerger(Repository db, NoteMerger noteMerger, MergeStrategy nonNotesMergeStrategy
			)
		{
			this.db = db;
			this.reader = db.NewObjectReader();
			this.inserter = db.NewObjectInserter();
			this.noteMerger = noteMerger;
			this.nonNotesMergeStrategy = nonNotesMergeStrategy;
			this.objectIdPrefix = new MutableObjectId();
		}
开发者ID:LunarLanding,项目名称:ngit,代码行数:20,代码来源:NoteMapMerger.cs


注:本文中的Repository.NewObjectReader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。