Ejemplo n.º 1
0
        public virtual void Initialize(BuildContext context, ConceptualGroup group)
        {
            BuildExceptions.NotNull(context, "context");
            BuildExceptions.NotNull(group, "group");

            if (_isInitialized)
            {
                return;
            }

            _context = context;
            _group   = group;

            if (_engineSettings == null)
            {
                BuildSettings settings = context.Settings;
                Debug.Assert(settings != null,
                             "The settings is not associated with the context.");
                if (settings == null)
                {
                    return;
                }
                _engineSettings = (ConceptualEngineSettings)settings.EngineSettings[
                    BuildEngineType.Conceptual];
                Debug.Assert(_engineSettings != null,
                             "The settings does not include the conceptual engine settings.");
                if (_engineSettings == null)
                {
                    return;
                }
            }

            _isInitialized = true;
        }
        /// <summary>
        /// This creates a new build object that is a deep copy of the current
        /// instance.
        /// </summary>
        /// <returns>
        /// A new build object that is a deep copy of this instance.
        /// </returns>
        public override BuildEngineSettings Clone()
        {
            ConceptualEngineSettings settings = new ConceptualEngineSettings(this);

            this.OnClone(settings);

            return(settings);
        }
Ejemplo n.º 3
0
        protected ConceptualVisitor(string name,
                                    ConceptualEngineSettings engineSettings)
            : this()
        {
            if (!String.IsNullOrEmpty(name))
            {
                _name = name;
            }

            _engineSettings = engineSettings;
        }
        public override void Initialize(BuildContext context)
        {
            base.Initialize(context);

            if (!this.IsInitialized)
            {
                return;
            }

            _settings = context.Settings;
            if (_settings == null || _settings.Style == null)
            {
                this.IsInitialized = false;

                return;
            }
            _engineSettings = _settings.EngineSettings[
                BuildEngineType.Conceptual] as ConceptualEngineSettings;
            Debug.Assert(_engineSettings != null,
                         "The settings does not include the reference engine settings.");
            if (_engineSettings == null)
            {
                this.IsInitialized = false;

                return;
            }

            _componentConfigList = _engineSettings.ComponentConfigurations;
            if (_componentConfigList != null && _componentConfigList.Count != 0)
            {
                _componentConfigList.Initialize(context);
            }

            _style = _settings.Style;

            //Keyword: "$(SandcastleCopyComponent)";
            if (ContainsComponents("SandcastleCopyComponent") == false)
            {
                string sandcastlePath = context.SandcastleDirectory;

                if (String.IsNullOrEmpty(sandcastlePath) == false ||
                    Directory.Exists(sandcastlePath))
                {
                    string copyComponents = Path.Combine(sandcastlePath,
                                                         @"ProductionTools\CopyComponents.dll");
                    RegisterComponents("SandcastleCopyComponent", copyComponents);
                }
            }

            this.RegisterItemHandlers();
        }
        public override void Initialize(BuildFormat format,
                                        BuildSettings settings, BuildGroup group)
        {
            base.Initialize(format, settings, group);

            if (!this.IsInitialized)
            {
                return;
            }

            _engineSettings = settings.EngineSettings[
                BuildEngineType.Conceptual] as ConceptualEngineSettings;
            Debug.Assert(_engineSettings != null,
                         "The settings does not include the reference engine settings.");
            if (_engineSettings == null)
            {
                this.IsInitialized = false;
                return;
            }
        }
Ejemplo n.º 6
0
 protected ConceptualTocVisitor(string name,
                                ConceptualEngineSettings engineSettings)
     : base(name, engineSettings)
 {
 }
        public override void Uninitialize()
        {
            _engineSettings = null;

            base.Uninitialize();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConceptualEngineSettings"/> class
 /// with parameters copied from the specified instance of the
 /// <see cref="ConceptualEngineSettings"/> class, a copy constructor.
 /// </summary>
 /// <param name="source">
 /// An instance of the <see cref="ConceptualEngineSettings"/> class from which the
 /// initialization parameters or values will be copied.
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// If the parameter <paramref name="source"/> is <see langword="null"/>.
 /// </exception>
 public ConceptualEngineSettings(ConceptualEngineSettings source)
     : base(source)
 {
 }