⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elementdecl.cs

📁 Freetextbox是优秀的在线编辑器
💻 CS
字号:
namespace FreeTextBoxControls.Support.Sgml
{
    using System;

    public class ElementDecl
    {
        public ElementDecl(string name, bool sto, bool eto, FreeTextBoxControls.Support.Sgml.ContentModel cm, string[] inclusions, string[] exclusions)
        {
            this.Name = name;
            this.StartTagOptional = sto;
            this.EndTagOptional = eto;
            this.ContentModel = cm;
            this.Inclusions = inclusions;
            this.Exclusions = exclusions;
        }

        public void AddAttDefs(FreeTextBoxControls.Support.Sgml.AttList list)
        {
            if (this.AttList == null)
            {
                this.AttList = list;
            }
            else
            {
                foreach (AttDef def1 in list)
                {
                    if (this.AttList[def1.Name] == null)
                    {
                        this.AttList.Add(def1);
                    }
                }
            }
        }

        public bool CanContain(string name, SgmlDtd dtd)
        {
            string text1;
            string[] textArray1;
            int num1;
            if (this.Exclusions != null)
            {
                textArray1 = this.Exclusions;
                for (num1 = 0; num1 < textArray1.Length; num1++)
                {
                    text1 = textArray1[num1];
                    if (text1 == name)
                    {
                        return false;
                    }
                }
            }
            if (this.Inclusions != null)
            {
                textArray1 = this.Inclusions;
                for (num1 = 0; num1 < textArray1.Length; num1++)
                {
                    text1 = textArray1[num1];
                    if (text1 == name)
                    {
                        return true;
                    }
                }
            }
            return this.ContentModel.CanContain(name, dtd);
        }

        public AttDef FindAttribute(string name)
        {
            return this.AttList[name.ToUpper()];
        }


        public FreeTextBoxControls.Support.Sgml.AttList AttList;
        public FreeTextBoxControls.Support.Sgml.ContentModel ContentModel;
        public bool EndTagOptional;
        public string[] Exclusions;
        public string[] Inclusions;
        public string Name;
        public bool StartTagOptional;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -