Пример #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;
                }
            }
        }
Пример #2
0
 /// <summary>
 ///    Clears the values stored in the current instance.
 /// </summary>
 public override void Clear()
 {
     description     = new ContentDescriptionObject();
     ext_description =
         new ExtendedContentDescriptionObject();
     metadata_library.RemoveRecords(0, 0, "WM/Picture");
 }
Пример #3
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;
		}
Пример #4
0
		/// <summary>
		///    Clears the values stored in the current instance.
		/// </summary>
		public override void Clear ()
		{
			description = new ContentDescriptionObject ();
			ext_description =
				new ExtendedContentDescriptionObject ();
			metadata_library.RemoveRecords (0, 0, "WM/Picture");
		}