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


C# AnyObjectId.ToString方法代码示例

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


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

示例1: fileFor

 /**
  * Compute the location of a loose object file.
  *
  * @param objectId
  *            identity of the loose object to map to the directory.
  * @return location of the object, if it were to exist as a loose object.
  */
 public FileInfo fileFor(AnyObjectId objectId)
 {
     return fileFor(objectId.ToString());
 }
开发者ID:ArildF,项目名称:GitSharp,代码行数:11,代码来源:ObjectDirectory.cs

示例2: hasObject

 /// <summary>
 /// Does the requested object exist in this database?
 /// <para />
 /// Alternates (if present) are searched automatically.
 /// </summary>
 /// <param name="objectId">identity of the object to test for existence of.</param>
 /// <returns>
 /// True if the specified object is stored in this database, or any
 /// of the alternate databases.
 /// </returns>
 public bool hasObject(AnyObjectId objectId)
 {
     return hasObjectImpl1(objectId) || hasObjectImpl2(objectId.ToString());
 }
开发者ID:drothmaler,项目名称:GitSharp,代码行数:14,代码来源:ObjectDatabase.cs

示例3: ToFile

        /**
	     * Construct a filename where the loose object having a specified SHA-1
	     * should be stored. If the object is stored in a shared repository the path
	     * to the alternative repo will be returned. If the object is not yet store
	     * a usable path in this repo will be returned. It is assumed that callers
	     * will look for objects in a pack first.
	     *
	     * @param objectId
	     * @return suggested file name
	     */

        public FileInfo ToFile(AnyObjectId objectId)
        {
            string n = objectId.ToString();
            string d = n.Substring(0, 2);
            string f = n.Substring(2);
            for (int i = 0; i < _objectsDirs.Count; ++i)
            {
                FileInfo ret = new FileInfo(PathUtil.Combine(_objectsDirs[i].FullName, d, f));
                if (ret.Exists)
                    return ret;
            }
            return new FileInfo(PathUtil.Combine(_objectsDirs[0].FullName, d, f));
        }
开发者ID:gilran,项目名称:GitSharp,代码行数:24,代码来源:Repository.cs

示例4: openObject

        /**
         * Open an object from this database.
         * <p>
         * Alternates (if present) are searched automatically.
         *
         * @param curs
         *            temporary working space associated with the calling thread.
         * @param objectId
         *            identity of the object to open.
         * @return a {@link ObjectLoader} for accessing the data of the named
         *         object, or null if the object does not exist.
         * @
         */
        public virtual ObjectLoader openObject(WindowCursor curs, AnyObjectId objectId)
        {
            if (objectId == null)
                return null;
            ObjectLoader ldr;

            ldr = openObjectImpl1(curs, objectId);
            if (ldr != null)
            {
                return ldr;
            }

            ldr = openObjectImpl2(curs, objectId.ToString(), objectId);
            if (ldr != null)
            {
                return ldr;
            }
            return null;
        }
开发者ID:stephensong,项目名称:GitSharp,代码行数:32,代码来源:ObjectDatabase.cs


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