當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。