Example #1
0
        protected override void OnReadXml(XmlReader reader)
        {
            if (String.Equals(reader.Name, ReferenceSource.TagName,
                              StringComparison.OrdinalIgnoreCase))
            {
                string sourceName = reader.GetAttribute("name");

                if (_topicSource == null)
                {
                    _topicSource = ReferenceSource.CreateSource(sourceName);
                }

                if (_topicSource == null)
                {
                    throw new BuildException(String.Format(
                                                 "The creation of the reference content source '{0}' failed.",
                                                 reader.GetAttribute("name")));
                }

                _topicSource.ReadXml(reader);
            }
            else if (String.Equals(reader.Name, "versionInfo",
                                   StringComparison.OrdinalIgnoreCase))
            {
                if (_versionInfo == null)
                {
                    _versionInfo = new ReferenceVersionInfo();
                }

                _versionInfo.ReadXml(reader);
            }
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReferenceGroup"/> class with
 /// parameters copied from the specified argument, a copy constructor.
 /// </summary>
 /// <param name="source">
 /// An instance of the <see cref="ReferenceGroup"/> class specifying the initial
 /// properties and states for this newly created instance.
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// If the <paramref name="source"/> is <see langword="null"/>.
 /// </exception>
 public ReferenceGroup(ReferenceGroup source)
     : base(source)
 {
     _versionType  = source._versionType;
     _xmlnsForXaml = source._xmlnsForXaml;
     _rootTitle    = source._rootTitle;
     _rootTopicId  = source._rootTopicId;
     _topicSource  = source._topicSource;
     _topicContent = source._topicContent;
     _rootTopicId  = source._rootTopicId;
 }
Example #3
0
        public ReferenceGroup(string groupName, string groupId,
                              ReferenceSource source) : base(groupName, groupId)
        {
            _versionType = ReferenceVersionType.None;

            _rootTitle   = "Programmer's Reference";
            _rootTopicId = String.Empty;
            _topicSource = source;
            if (_topicSource == null)
            {
                _topicContent = new ReferenceContent();
            }
        }