本文整理汇总了C#中FilePath.HasExtension方法的典型用法代码示例。如果您正苦于以下问题:C# FilePath.HasExtension方法的具体用法?C# FilePath.HasExtension怎么用?C# FilePath.HasExtension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FilePath
的用法示例。
在下文中一共展示了FilePath.HasExtension方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CanHandle
public bool CanHandle (FilePath fileName, string mimeType, Project ownerProject)
{
if (ownerProject == null || !XcodeProjectTracker.TrackerEnabled || !(ownerProject is IXcodeTrackedProject))
return false;
if (mimeType == "application/vnd.apple-interface-builder")
return true;
return fileName.IsNotNull && fileName.HasExtension (".xib");
}
示例2: CanHandle
public bool CanHandle(FilePath fileName, string mimeType, Project ownerProject)
{
if (ownerProject == null || !(ownerProject is MonobjcProject)) {
return false;
}
if (Constants.IB_MIME_TYPE.Equals (mimeType)) {
return true;
}
return !fileName.IsNullOrEmpty && fileName.HasExtension (Constants.DOT_XIB);
}
示例3: HasInterfaceDefinitionExtension
public virtual bool HasInterfaceDefinitionExtension (FilePath fileName)
{
return fileName.HasExtension (".xib");
}
示例4: CanHandle
public bool CanHandle (FilePath filePath, string mimeType, Project project)
{
return filePath.IsNotNull && filePath.HasExtension (".po");
}
示例5: CanHandle
public bool CanHandle (FilePath fileName, string mimeType, Project ownerProject)
{
return (fileName.IsNotNull && fileName.HasExtension (".desktop"))
|| (mimeType != null && mimeType == "application/x-desktop");
}
示例6: FileExtensionIsProper
public void FileExtensionIsProper ()
{
var path = new FilePath ("asdf.txt");
Assert.AreEqual ("asdf.txt", path.FileName);
Assert.IsTrue (path.HasExtension (".txt"));
Assert.AreEqual (".txt", path.Extension);
Assert.AreEqual ("asdf", path.FileNameWithoutExtension);
path = new FilePath (".gitignore");
Assert.False (path.HasExtension (".gitignore"));
Assert.AreEqual (".gitignore", path.FileName);
Assert.AreEqual (".gitignore", path.Extension);
Assert.AreEqual ("", path.FileNameWithoutExtension);
}
示例7: HasPageExtension
public virtual bool HasPageExtension (FilePath fileName)
{
return fileName.HasExtension (".xib");
}
示例8:
bool IDisplayBinding.CanHandle(FilePath fileName, string mimeType, Project ownerProject)
{
return ownerProject != null && ((fileName.IsNotNull && fileName.HasExtension (".cd"))
|| (mimeType != null && mimeType == "class-diagram"));
}
示例9: CanHandle
public bool CanHandle (FilePath fileName, string mimeType, Project ownerProject)
{
return fileName.IsNotNull && fileName.HasExtension (".sql");
}