コード例 #1
0
ファイル: Element.cs プロジェクト: enptcvr/agsXmpp-1
        /// <summary>
        /// Remove a Tag when it exists
        /// </summary>
        /// <param name="TagName">Tagname to remove</param>
        /// <returns>true when existing and removed, false when not existing</returns>
        public bool RemoveTag(string TagName)
        {
            Element tag = _SelectElement(this, TagName);

            if (tag != null)
            {
                tag.Remove();
                return(true);
            }
            return(false);
        }
コード例 #2
0
ファイル: Element.cs プロジェクト: enptcvr/agsXmpp-1
        public bool RemoveTag <T>() where T : Element
        {
            Element tag = SelectSingleElement <T>();

            if (tag != null)
            {
                tag.Remove();
                return(true);
            }

            return(false);
        }
コード例 #3
0
ファイル: Element.cs プロジェクト: enptcvr/agsXmpp-1
        /// <summary>
        /// Remove a Tag when it exists
        /// </summary>
        /// <param name="type">Type of the tag that should be removed</param>
        /// <returns>true when existing and removed, false when not existing</returns>
        public bool RemoveTag(Type type)
        {
            Element tag = _SelectElement(this, type);

            if (tag != null)
            {
                tag.Remove();
                return(true);
            }

            return(false);
        }
コード例 #4
0
        /// <summary>
        /// Remove a Tag when it exists
        /// </summary>
        /// <param name="type">Type of the tag that should be removed</param>
        /// <returns>true when existing and removed, false when not existing</returns>
        public bool RemoveTag(System.Type type)
        {
            Element tag = this._SelectElement(this, type);

            if (tag != null)
            {
                tag.Remove();
                return(true);
            }
            else
            {
                return(false);
            }
        }