コード例 #1
0
ファイル: Tag.cs プロジェクト: windygu/alexandrialibrary
        /// <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
ファイル: Tag.cs プロジェクト: windygu/alexandrialibrary
 /// <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
ファイル: Tag.cs プロジェクト: bossaia/alexandrialibrary
		/// <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
ファイル: Tag.cs プロジェクト: bossaia/alexandrialibrary
		/// <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");
		}