Exemple #1
0
        private void InitConfigurations(object solutionProject)
        {
            System.Collections.IDictionary ProjectConfigurationsValue = (System.Collections.IDictionary)ReflectionTools.GetPropertyValue(ProjectInSolutionProjectConfigurations, solutionProject);
            List <Configuration>           ConfigurationList          = new();

            foreach (string Key in ProjectConfigurationsValue.Keys)
            {
                object?Value = ProjectConfigurationsValue[Key];

                string[] Splits = Key.Split('|');
                if (Splits.Length >= 2 && Value != null)
                {
                    string ConfigurationName = Splits[0];
                    string PlatformName      = Splits[1];
                    ConfigurationList.Add(new Configuration(this, Value, ConfigurationName, PlatformName));
                }
            }

            ProjectConfigurations = ConfigurationList.AsReadOnly();
        }
        static Configuration()
        {
            ProjectConfigurationInSolutionType = ReflectionTools.GetProjectInSolutionType("ProjectConfigurationInSolution");

            ProjectConfigurationInSolutionIncludeInBuild = ReflectionTools.GetTypeProperty(ProjectConfigurationInSolutionType, nameof(IncludeInBuild));
        }
Exemple #3
0
        private void InitDependencies(object solutionProject)
        {
            System.Collections.IEnumerable DependenciesValue = (System.Collections.IEnumerable)ReflectionTools.GetPropertyValue(ProjectInSolutionDependencies, solutionProject);
            List <string> DependencyList = new();

            foreach (string Item in DependenciesValue)
            {
                DependencyList.Add(Item);
            }
            Dependencies = DependencyList.AsReadOnly();

            System.Collections.IEnumerable ProjectReferencesValue = (System.Collections.IEnumerable)ReflectionTools.GetPropertyValue(ProjectInSolutionProjectReferences, solutionProject);
            List <string> ProjectReferenceList = new();

            foreach (string Item in ProjectReferencesValue)
            {
                ProjectReferenceList.Add(Item);
            }
            ProjectReferences = ProjectReferenceList.AsReadOnly();

            object?ParentProjectGuidValue = ProjectInSolutionParentProjectGuid.GetValue(solutionProject);

            if (ParentProjectGuidValue != null)
            {
                ParentProjectGuid = (string)ParentProjectGuidValue;
            }
            else
            {
                ParentProjectGuid = string.Empty;
            }
        }