LoadItem() public static method

public static LoadItem ( IProgressMonitor monitor, string fileName, MonoDevelop.Projects.Formats.MSBuild.MSBuildFileFormat expectedFormat, string typeGuid, string itemGuid ) : SolutionEntityItem
monitor IProgressMonitor
fileName string
expectedFormat MonoDevelop.Projects.Formats.MSBuild.MSBuildFileFormat
typeGuid string
itemGuid string
return SolutionEntityItem
Beispiel #1
0
 public object ReadFile(FilePath file, Type expectedType, MonoDevelop.Core.IProgressMonitor monitor)
 {
     if (slnFileFormat.CanReadFile(file, this))
     {
         return(slnFileFormat.ReadFile(file, this, monitor));
     }
     else
     {
         return(MSBuildProjectService.LoadItem(monitor, file, null, null, null));
     }
 }
        public static bool SupportsProjectType(string projectFile)
        {
            if (!string.IsNullOrWhiteSpace(projectFile))
            {
                // If we have a project file, try to load it.
                try {
                    using (var monitor = new ConsoleProgressMonitor()) {
                        return(MSBuildProjectService.LoadItem(monitor, projectFile, null, null, null) != null);
                    }
                } catch {
                    return(false);
                }
            }

            return(false);
        }