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


C# FileName.ToString方法代码示例

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


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

示例1: Create

		/// <summary>
		/// Retrieves the file contents for the specified project items.
		/// </summary>
		public ITextBuffer Create(FileName fileName)
		{
			foreach (FileName name in viewContentFileNamesCollection) {
				if (FileUtility.IsEqualFileName(name, fileName))
					return WorkbenchSingleton.SafeThreadFunction(ParserService.GetParseableFileContent, fileName.ToString());
			}
			try {
				return new StringTextBuffer(ICSharpCode.AvalonEdit.Utils.FileReader.ReadFileContent(fileName, ParserService.DefaultFileEncoding));
			} catch (IOException) {
				return null;
			} catch (UnauthorizedAccessException) {
				return null;
			}
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:17,代码来源:ParseableFileContentFinder.cs

示例2: CreateParseInformation

        ParseInformation IVbpProjectSymbolCache.GetAndReparse(FileName fileName, ITextSource fileContent)
        {
            string fn = fileName.ToString();

            _cache[fn] = CreateParseInformation(fn, fileContent, _project);
            return _cache[fn];
        }
开发者ID:mks786,项目名称:vb6leap,代码行数:7,代码来源:VbpProjectSymbolCache.cs

示例3: ToResourceName

		string ToResourceName(FileName fileName)
		{
			return prefix + fileName.ToString().Replace('\\', '.');
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:4,代码来源:EmbeddedResourceFileSystem.cs

示例4: GetCacheFileName

 string GetCacheFileName(FileName assemblyFileName)
 {
     if (DomPersistencePath == null)
         return null;
     string cacheFileName = Path.GetFileNameWithoutExtension(assemblyFileName);
     if (cacheFileName.Length > 32)
         cacheFileName = cacheFileName.Substring(cacheFileName.Length - 32); // use 32 last characters
     cacheFileName = Path.Combine(DomPersistencePath, cacheFileName + "." + assemblyFileName.ToString().ToUpperInvariant().GetStableHashCode().ToString("x8") + ".dat");
     return cacheFileName;
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:10,代码来源:AssemblyParserService.cs

示例5: CanCreateContentForFile

		public bool CanCreateContentForFile(FileName fileName)
		{
			return fileName.ToString().StartsWith("ilspy://", StringComparison.OrdinalIgnoreCase);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:4,代码来源:ILSpyDisplayBinding.cs

示例6: IsPreferredBindingForFile

		public bool IsPreferredBindingForFile(FileName fileName)
		{
			return fileName.ToString().StartsWith("ilspy://", StringComparison.OrdinalIgnoreCase);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:4,代码来源:ILSpyDisplayBinding.cs

示例7: GetCacheFileName

		static string GetCacheFileName(FileName projectFileName)
		{
			string persistencePath = SD.AssemblyParserService.DomPersistencePath;
			if (persistencePath == null)
				return null;
			string cacheFileName = Path.GetFileNameWithoutExtension(projectFileName);
			if (cacheFileName.Length > 32)
				cacheFileName = cacheFileName.Substring(cacheFileName.Length - 32); // use 32 last characters
			cacheFileName = Path.Combine(persistencePath, cacheFileName + "." + projectFileName.ToString().GetStableHashCode().ToString("x8") + ".prj");
			return cacheFileName;
		}
开发者ID:jrenzas,项目名称:SharpDevelop,代码行数:11,代码来源:ProjectContentContainer.cs

示例8: AreFileNamesEqual

		bool AreFileNamesEqual(FileName lhs, string rhs)
		{
			return FileUtility.IsEqualFileName(lhs.ToString(), rhs);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:4,代码来源:OpenTextEditors.cs


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