Exemple #1
0
        /// <summary>
        ///    Constructs and initializes a new instance of <see
        ///    cref="Tag" /> using the children of a <see
        ///    cref="HeaderObject" /> object.
        /// </summary>
        /// <param name="header">
        ///    A <see cref="HeaderObject" /> object whose children are
        ///    are to be used by the new instance.
        /// </param>
        /// <exception cref="ArgumentNullException">
        ///    <paramref name="header" /> is <see langword="null" />.
        /// </exception>
        public Tag(HeaderObject header)
        {
            if (header == null)
            {
                throw new ArgumentNullException("header");
            }

            foreach (Object child in header.Children)
            {
                if (child is ContentDescriptionObject)
                {
                    description =
                        child as ContentDescriptionObject;
                }

                if (child is ExtendedContentDescriptionObject)
                {
                    ext_description =
                        child as ExtendedContentDescriptionObject;
                }
            }

            foreach (Object child in header.Extension.Children)
            {
                if (child is MetadataLibraryObject)
                {
                    metadata_library =
                        child as MetadataLibraryObject;
                }
            }
        }
Exemple #2
0
		/// <summary>
		///    Constructs and initializes a new instance of <see
		///    cref="Tag" /> using the children of a <see
		///    cref="HeaderObject" /> object.
		/// </summary>
		/// <param name="header">
		///    A <see cref="HeaderObject" /> object whose children are
		///    are to be used by the new instance.
		/// </param>
		/// <exception cref="ArgumentNullException">
		///    <paramref name="header" /> is <see langword="null" />.
		/// </exception>
		public Tag (HeaderObject header)
		{
			if (header == null)
				throw new ArgumentNullException ("header");
			
			foreach (Object child in header.Children) {
				if (child is ContentDescriptionObject)
					description =
						child as ContentDescriptionObject;
			
				if (child is ExtendedContentDescriptionObject)
					ext_description =
						child as ExtendedContentDescriptionObject;
			}
			
			foreach (Object child in header.Extension.Children)
				if (child is MetadataLibraryObject)
					metadata_library =
						child as MetadataLibraryObject;
		}