示例#1
0
        public Tag Add(TagType tagType, TagType limitToType)
        {
            Tag tag;

            tag = TagFactory.CreateTag(string.Empty, tagType, limitToType);

            this.Add(tag);

            return(tag);
        }
        /// <summary>
        /// Creates and adds a new unnamed <see cref="TagLong"/> with the specified value.
        /// </summary>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagLong"/> containing the specified name and value.
        /// </returns>
        public TagLong Add(long value)
        {
            TagLong tag;

            tag = TagFactory.CreateTag(value);

            this.Add(tag);

            return(tag);
        }
        /// <summary>
        /// Creates and adds a new unnamed <see cref="TagFloat"/> with the specified value.
        /// </summary>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagFloat"/> containing the specified name and value.
        /// </returns>
        public TagFloat Add(float value)
        {
            TagFloat tag;

            tag = TagFactory.CreateTag(value);

            this.Add(tag);

            return(tag);
        }
        /// <summary>
        /// Creates and adds a new unnamed <see cref="TagShort"/> with the specified value.
        /// </summary>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagShort"/> containing the specified name and value.
        /// </returns>
        public TagShort Add(short value)
        {
            TagShort tag;

            tag = TagFactory.CreateTag(value);

            this.Add(tag);

            return(tag);
        }
        /// <summary>
        /// Creates and adds a new unnamed <see cref="TagInt"/> with the specified value.
        /// </summary>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagInt"/> containing the specified name and value.
        /// </returns>
        public TagInt Add(int value)
        {
            TagInt tag;

            tag = TagFactory.CreateTag(value);

            this.Add(tag);

            return(tag);
        }
        /// <summary>
        /// Creates and adds a new unnamed <see cref="TagCompound"/> with the specified value.
        /// </summary>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagCompound"/> containing the specified name and value.
        /// </returns>
        public TagCompound Add(TagDictionary value)
        {
            TagCompound tag;

            tag = TagFactory.CreateTag(value);

            this.Add(tag);

            return(tag);
        }
        /// <summary>
        /// Creates and adds a new unnamed <see cref="TagByte"/> with the specified value.
        /// </summary>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagByte"/> containing the specified name and value.
        /// </returns>
        public TagByte Add(byte value)
        {
            TagByte tag;

            tag = TagFactory.CreateTag(value);

            this.Add(tag);

            return(tag);
        }
        /// <summary>
        /// Creates and adds a new unnamed <see cref="TagDouble"/> with the specified value.
        /// </summary>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagDouble"/> containing the specified name and value.
        /// </returns>
        public TagDouble Add(double value)
        {
            TagDouble tag;

            tag = TagFactory.CreateTag(value);

            this.Add(tag);

            return(tag);
        }
        /// <summary>
        /// Creates and adds a new unnamed <see cref="TagList"/> with the specified value.
        /// </summary>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagList"/> containing the specified name and value.
        /// </returns>
        public TagList Add(TagCollection value)
        {
            TagList tag;

            tag = TagFactory.CreateTag(value);

            this.Add(tag);

            return(tag);
        }
示例#10
0
        /// <summary>
        /// Creates and adds a new <see cref="TagLong"/> with the specified name and value.
        /// </summary>
        /// <param name="name">The name of the tag to add.</param>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagLong"/> containing the specified name and value.
        /// </returns>
        public TagLong Add(string name, long value)
        {
            TagLong tag;

            tag = TagFactory.CreateTag(name, value);

            this.Add(tag);

            return(tag);
        }
示例#11
0
        /// <summary>
        /// Creates and adds a new <see cref="TagInt"/> with the specified name and value.
        /// </summary>
        /// <param name="name">The name of the tag to add.</param>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagInt"/> containing the specified name and value.
        /// </returns>
        public TagInt Add(string name, int value)
        {
            TagInt tag;

            tag = TagFactory.CreateTag(name, value);

            this.Add(tag);

            return(tag);
        }
示例#12
0
        /// <summary>
        /// Creates and adds a new <see cref="TagShort"/> with the specified name and value.
        /// </summary>
        /// <param name="name">The name of the tag to add.</param>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagShort"/> containing the specified name and value.
        /// </returns>
        public TagShort Add(string name, short value)
        {
            TagShort tag;

            tag = TagFactory.CreateTag(name, value);

            this.Add(tag);

            return(tag);
        }
示例#13
0
        /// <summary>
        /// Creates and adds a new <see cref="TagByte"/> with the specified name and value.
        /// </summary>
        /// <param name="name">The name of the tag to add.</param>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagByte"/> containing the specified name and value.
        /// </returns>
        public TagByte Add(string name, byte value)
        {
            TagByte tag;

            tag = TagFactory.CreateTag(name, value);

            this.Add(tag);

            return(tag);
        }
示例#14
0
        /// <summary>
        /// Creates and adds a new <see cref="TagList"/> with the specified name and value.
        /// </summary>
        /// <param name="name">The name of the tag to add.</param>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagList"/> containing the specified name and value.
        /// </returns>
        public TagList Add(string name, TagCollection value)
        {
            TagList tag;

            tag = TagFactory.CreateTag(name, value);

            this.Add(tag);

            return(tag);
        }
示例#15
0
        /// <summary>
        /// Creates and adds a new <see cref="TagDouble"/> with the specified name and value.
        /// </summary>
        /// <param name="name">The name of the tag to add.</param>
        /// <param name="value">The value of the tag.</param>
        /// <returns>
        /// A <see cref="TagDouble"/> containing the specified name and value.
        /// </returns>
        public TagDouble Add(string name, double value)
        {
            TagDouble tag;

            tag = TagFactory.CreateTag(name, value);

            this.Add(tag);

            return(tag);
        }
示例#16
0
        public ITag Add(string name, TagType tagType, TagType limitToType)
        {
            ITag           tag;
            ICollectionTag collectionTag;

            tag      = TagFactory.CreateTag(tagType);
            tag.Name = name;

            collectionTag = tag as ICollectionTag;
            if (collectionTag != null)
            {
                collectionTag.LimitToType = limitToType;
            }

            this.Add(tag);

            return(tag);
        }