Пример #1
0
        internal void ReadSolution(ProgressMonitor monitor)
        {
            var sln = new SlnFile();

            sln.Read(this.FileName);

            using (currentLoadContext = new SolutionLoadContext(this))
                SolutionExtension.OnReadSolution(monitor, sln);
            currentLoadContext = null;
        }
Пример #2
0
        internal protected virtual void OnReadSolution(ProgressMonitor monitor, SlnFile file)
        {
            var secAttribute = (SolutionDataSectionAttribute)Attribute.GetCustomAttribute(GetType(), typeof(SolutionDataSectionAttribute));

            if (secAttribute != null && secAttribute.ProcessOrder == SlnSectionType.PreProcess)
            {
                var sec = file.Sections.GetSection(secAttribute.SectionName, SlnSectionType.PreProcess);
                if (sec != null)
                {
                    sec.ReadObjectProperties(this);
                }
            }

            next.OnReadSolution(monitor, file);

            if (secAttribute != null && secAttribute.ProcessOrder == SlnSectionType.PostProcess)
            {
                var sec = file.Sections.GetSection(secAttribute.SectionName, SlnSectionType.PostProcess);
                if (sec != null)
                {
                    sec.ReadObjectProperties(this);
                }
            }
        }