Example #1
0
 public LibrariesInfo(ProjectWrapper Project, SolutionWrapper Solution, FeatureReferenceInfo FeaturesInfo)
     : base(FeaturesInfo == null ? null : FeaturesInfo.References, Project, Solution, AllComponents)
 {
     this.Project.Libraries         = GetComponents(this.Project.Libraries);
     this.Project.LibraryCategories = GetComponents(this.Project.LibraryCategories);
     this.Project.Features          = GetComponents(this.Project.Features);
     this.Processor    = PK.Wrapper.FindProcessor(Solution.Processor.Guid);
     this.Templates    = new Collection <LibraryWrapper>();
     this.FeaturesInfo = FeaturesInfo;
 }
Example #2
0
 public FeatureReferenceInfo(ProjectWrapper Project, SolutionWrapper Solution)
     : base(Project, Solution, DefaultComponents)
 {
     Project.Features = GetComponents(Project.Features);
 }
Example #3
0
 public ReferenceInfo(ProjectWrapper Project, SolutionWrapper Solution, OnAddComponentHandler OnAddComponent)
     : this(null, Project, Solution, OnAddComponent)
 {
 }
Example #4
0
        public ReferenceInfo(Dictionary <ComponentWrapper, ReferenceData> references, ProjectWrapper Project, SolutionWrapper Solution, OnAddComponentHandler OnAddComponent)
        {
            this.ReadOnlyComponents = new List <ComponentWrapper>();
            this.Project            = Project;
            this.Solution           = Solution;
            this.OnAddComponent     = OnAddComponent;
            this.AddedComponents    = new Collection <ComponentWrapper>();
            this.RemovedComponents  = new Collection <ComponentWrapper>();

            if (references != null)
            {
                this.References = references;
            }
            else
            {
                this.References = new Dictionary <ComponentWrapper, ReferenceData>();

                foreach (BaseWrapper wrapper in GetComponents())
                {
                    ComponentWrapper component = ComponentWrapper.GetComponentWrapper(wrapper);
                    References.Add(component, new ReferenceData(wrapper));
                }
                foreach (ComponentWrapper component in this.References.Keys)
                {
                    BaseWrapper wrapper = this[component].Wrapper;
                    switch (component.ComponentType)
                    {
                    case ComponentTypeWrapper.Library:
                        LibraryWrapper library = wrapper as LibraryWrapper;
                        Debug.Assert(library != null);
                        library.Dependencies = GetComponents(library.Dependencies);
                        if ((library.LibraryCategory != null) && (library.HasLibraryCategory))
                        {
                            library.LibraryCategory = GetComponent(library.LibraryCategory);
                        }
                        break;

                    case ComponentTypeWrapper.Feature:
                        FeatureWrapper feature = wrapper as FeatureWrapper;
                        Debug.Assert(feature != null);
                        feature.FeatureDependencies   = GetComponents(feature.FeatureDependencies);
                        feature.ComponentDependencies = GetComponents(feature.ComponentDependencies);
                        break;

                    case ComponentTypeWrapper.LibraryCategory:
                        LibraryCategoryWrapper libcat = wrapper as LibraryCategoryWrapper;
                        Debug.Assert(libcat != null);
                        libcat.FeatureAssociations = GetComponents(libcat.FeatureAssociations);
                        break;

                    default:
                        Debug.Assert(false);
                        break;
                    }
                }
                this.Solution.TransportType.FeatureAssociations = GetComponents(this.Solution.TransportType.FeatureAssociations);
            }
        }
Example #5
0
 public static ComponentWrapper GetComponentWrapper(ProjectWrapper project)
 {
     return(GetComponentWrapper(project, ComponentTypeWrapper.Unknown));
 }