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


C# AnyObjectId.Copy方法代码示例

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


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

示例1: TrackingRefUpdate

        internal TrackingRefUpdate(bool canForceUpdate, string remoteName, string localName
			, AnyObjectId oldValue, AnyObjectId newValue)
        {
            this.remoteName = remoteName;
            this.localName = localName;
            this.forceUpdate = canForceUpdate;
            this.oldObjectId = oldValue.Copy();
            this.newObjectId = newValue.Copy();
        }
开发者ID:stinos,项目名称:ngit,代码行数:9,代码来源:TrackingRefUpdate.cs

示例2: SetObjectId

		/// <summary>Set the identity of the object, if its not already set.</summary>
		/// <remarks>Set the identity of the object, if its not already set.</remarks>
		/// <param name="id">the id of the object that is too large to process.</param>
		public virtual void SetObjectId(AnyObjectId id)
		{
			if (objectId == null)
			{
				objectId = id.Copy();
			}
		}
开发者ID:LunarLanding,项目名称:ngit,代码行数:10,代码来源:LargeObjectException.cs

示例3: LargeObject

			internal LargeObject(int type, long size, FilePath path, AnyObjectId id, FileObjectDatabase
				 db)
			{
				this.type = type;
				this.size = size;
				this.path = path;
				this.id = id.Copy();
				this.source = db;
			}
开发者ID:nocache,项目名称:monodevelop,代码行数:9,代码来源:UnpackedObject.cs

示例4: FindCRC32

		/// <exception cref="NGit.Errors.MissingObjectException"></exception>
		public override long FindCRC32(AnyObjectId objId)
		{
			int levelOne = objId.FirstByte;
			int levelTwo = BinarySearchLevelTwo(objId, levelOne);
			if (levelTwo == -1)
			{
				throw new MissingObjectException(objId.Copy(), "unknown");
			}
			return NB.DecodeUInt32(crc32[levelOne], levelTwo << 2);
		}
开发者ID:LunarLanding,项目名称:ngit,代码行数:11,代码来源:PackIndexV2.cs

示例5: SetNewObjectId

		/// <summary>Set the new value the ref will update to.</summary>
		/// <remarks>Set the new value the ref will update to.</remarks>
		/// <param name="id">the new value.</param>
		public virtual void SetNewObjectId(AnyObjectId id)
		{
			newValue = id.Copy();
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:7,代码来源:RefUpdate.cs

示例6: Open

		/// <exception cref="NGit.Errors.MissingObjectException"></exception>
		/// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception>
		/// <exception cref="System.IO.IOException"></exception>
		public override ObjectLoader Open(AnyObjectId objectId, int typeHint)
		{
			ObjectLoader ldr = db.OpenObject(this, objectId);
			if (ldr == null)
			{
				if (typeHint == OBJ_ANY)
				{
					throw new MissingObjectException(objectId.Copy(), "unknown");
				}
				throw new MissingObjectException(objectId.Copy(), typeHint);
			}
			if (typeHint != OBJ_ANY && ldr.GetType() != typeHint)
			{
				throw new IncorrectObjectTypeException(objectId.Copy(), typeHint);
			}
			return ldr;
		}
开发者ID:nickname100,项目名称:monodevelop,代码行数:20,代码来源:WindowCursor.cs

示例7: GetObjectSize

		/// <exception cref="NGit.Errors.MissingObjectException"></exception>
		/// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception>
		/// <exception cref="System.IO.IOException"></exception>
		public override long GetObjectSize(AnyObjectId objectId, int typeHint)
		{
			long sz = db.GetObjectSize(this, objectId);
			if (sz < 0)
			{
				if (typeHint == OBJ_ANY)
				{
					throw new MissingObjectException(objectId.Copy(), "unknown");
				}
				throw new MissingObjectException(objectId.Copy(), typeHint);
			}
			return sz;
		}
开发者ID:nickname100,项目名称:monodevelop,代码行数:16,代码来源:WindowCursor.cs

示例8: RecordError

		private void RecordError(AnyObjectId id, Exception what)
		{
			ObjectId objId = id.Copy();
			IList<Exception> errors = fetchErrors.Get(objId);
			if (errors == null)
			{
				errors = new AList<Exception>(2);
				fetchErrors.Put(objId, errors);
			}
			errors.AddItem(what);
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:11,代码来源:WalkFetchConnection.cs

示例9: SetObjectId

		/// <summary>Set the object this tag refers to, and its type.</summary>
		/// <remarks>Set the object this tag refers to, and its type.</remarks>
		/// <param name="obj">the object.</param>
		/// <param name="objType">
		/// the type of
		/// <code>obj</code>
		/// . Must be a valid type code.
		/// </param>
		public virtual void SetObjectId(AnyObjectId obj, int objType)
		{
			@object = obj.Copy();
			type = objType;
		}
开发者ID:LunarLanding,项目名称:ngit,代码行数:13,代码来源:TagBuilder.cs

示例10: Add

			internal virtual bool Add(AnyObjectId toAdd)
			{
				int i = Index(toAdd);
				for (int n = 0; n < MAX_CHAIN; )
				{
					ObjectId obj = ids.Get(i);
					if (obj == null)
					{
						if (ids.CompareAndSet(i, null, toAdd.Copy()))
						{
							return true;
						}
						else
						{
							continue;
						}
					}
					if (AnyObjectId.Equals(obj, toAdd))
					{
						return true;
					}
					if (++i == ids.Length())
					{
						i = 0;
					}
					n++;
				}
				return false;
			}
开发者ID:LunarLanding,项目名称:ngit,代码行数:29,代码来源:UnpackedObjectCache.cs


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