Example #1
0
        public static void LoadDefault(string strDirPath, PlgxPluginInfo plgxOutInfo)
        {
            if (plgxOutInfo == null)
            {
                throw new ArgumentNullException("plgxOutInfo");
            }

            string[] vCsproj = Directory.GetFiles(strDirPath, "*.csproj",
                                                  SearchOption.AllDirectories);
            if ((vCsproj != null) && (vCsproj.Length == 1))
            {
                plgxOutInfo.ProjectType = PlgxProjectType.CSharp;
                PlgxCsprojLoader.Load(vCsproj[0], plgxOutInfo);
                return;
            }

            // string[] vVbproj = Directory.GetFiles(strDirPath, "*.vbproj",
            //	SearchOption.AllDirectories);
            // if((vVbproj != null) && (vVbproj.Length == 1))
            // {
            //	plgxOutInfo.ProjectType = PlgxProjectType.VisualBasic;
            //	PlgxCsprojLoader.Load(vVbproj[0], plgxOutInfo);
            //	return;
            // }

            throw new InvalidOperationException(KPRes.CsprojCountError);
        }
Example #2
0
        public static void LoadDefault(string strDirPath, PlgxPluginInfo plgxOutInfo)
        {
            if (plgxOutInfo == null)
            {
                throw new ArgumentNullException("plgxOutInfo");
            }

            List <string> lCsproj = UrlUtil.GetFilePaths(strDirPath, "*.csproj",
                                                         SearchOption.AllDirectories);

            if (lCsproj.Count == 1)
            {
                plgxOutInfo.ProjectType = PlgxProjectType.CSharp;
                PlgxCsprojLoader.Load(lCsproj[0], plgxOutInfo);
                return;
            }

            // List<string> lVbproj = UrlUtil.GetFilePaths(strDirPath, "*.vbproj",
            //	SearchOption.AllDirectories);
            // if(lVbproj.Count == 1)
            // {
            //	plgxOutInfo.ProjectType = PlgxProjectType.VisualBasic;
            //	PlgxCsprojLoader.Load(lVbproj[0], plgxOutInfo);
            //	return;
            // }

            throw new InvalidOperationException(KPRes.CsprojCountError);
        }