GetUnknownProjectTypeInfo() 정적인 개인적인 메소드

static private GetUnknownProjectTypeInfo ( string guids ) : MonoDevelop.Projects.Extensions.UnknownProjectTypeNode
guids string
리턴 MonoDevelop.Projects.Extensions.UnknownProjectTypeNode
예제 #1
0
        public static SolutionEntityItem LoadItem(IProgressMonitor monitor, string fileName, MSBuildFileFormat expectedFormat, string typeGuid, string itemGuid)
        {
            foreach (ItemTypeNode node in GetItemTypeNodes())
            {
                if (node.CanHandleFile(fileName, typeGuid))
                {
                    return(node.LoadSolutionItem(monitor, fileName, expectedFormat, itemGuid));
                }
            }

            if (string.IsNullOrEmpty(typeGuid) && IsProjectSubtypeFile(fileName))
            {
                typeGuid = LoadProjectTypeGuids(fileName);
                foreach (ItemTypeNode node in GetItemTypeNodes())
                {
                    if (node.CanHandleFile(fileName, typeGuid))
                    {
                        return(node.LoadSolutionItem(monitor, fileName, expectedFormat, itemGuid));
                    }
                }
            }

            // If it is a known unsupported project, load it as UnknownProject
            var projectInfo = MSBuildProjectService.GetUnknownProjectTypeInfo(typeGuid != null ? new [] { typeGuid } : new string[0], fileName);

            if (projectInfo != null && projectInfo.LoadFiles)
            {
                if (typeGuid == null)
                {
                    typeGuid = projectInfo.Guid;
                }
                var h = new MSBuildProjectHandler(typeGuid, "", itemGuid);
                h.SetUnsupportedType(projectInfo);
                return(h.Load(monitor, fileName, expectedFormat, "", null));
            }

            return(null);
        }