示例#1
0
        private CsProjectParser(CSProject project)
        {
            _project    = project;
            _projectXml = XElement.Load(project.ProjectFilePath);

            var projectInfo = new CSProjectInfo();

            projectInfo.AsmName       = _projectXml.Elements(_msbuildNs + "PropertyGroup").Elements(_msbuildNs + "AssemblyName").Single().Value;
            projectInfo.Version       = _projectXml.Elements(_msbuildNs + "PropertyGroup").Elements(_msbuildNs + "TargetFrameworkVersion").Single().Value;
            projectInfo.RootNamespace = _projectXml.Elements(_msbuildNs + "PropertyGroup").Elements(_msbuildNs + "RootNamespace").Single().Value;
            projectInfo.ProjectGuid   = Guid.Parse(_projectXml.Elements(_msbuildNs + "PropertyGroup").Elements(_msbuildNs + "ProjectGuid").Single().Value);

            _project.Info = projectInfo;
        }
示例#2
0
 public static CsProjectParser LoadProject(CSProject project)
 {
     return(new CsProjectParser(project));
 }
示例#3
0
 public KProject(CSProject project, ISet <string> projectReferences)
 {
     _project           = project;
     _projectReferences = projectReferences;
 }