当前位置: 首页>>代码示例>>C#>>正文


C# XmlHelper.SetAttribute方法代码示例

本文整理汇总了C#中XmlHelper.SetAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# XmlHelper.SetAttribute方法的具体用法?C# XmlHelper.SetAttribute怎么用?C# XmlHelper.SetAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XmlHelper的用法示例。


在下文中一共展示了XmlHelper.SetAttribute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetXml

 internal XmlElement GetXml()
 {
     XmlHelper h = new XmlHelper("<Order/>");
     h.SetAttribute(".", "Target", Target);
     h.SetAttribute(".", "Source", Source);
     return h.GetElement(".");
 }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:7,代码来源:Order.cs

示例2: Output

 public XmlElement Output()
 {
     XmlHelper h = new XmlHelper("<Converter />");
     h.SetAttribute(".", "Name", this.Name);
     h.SetAttribute(".", "Type", this.Type);
     h.AddElement(".", "Key", this.Key);
     return h.GetElement(".");
 }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:8,代码来源:DecodeConverter.cs

示例3: GetXml

 public System.Xml.XmlElement GetXml()
 {
     UUIDVariableEditor editor = this.Editor as UUIDVariableEditor;
     XmlHelper h = new XmlHelper("<Variable/>");
     h.SetAttribute(".", "Name", editor.VariableName);
     h.SetAttribute(".", "Source", this.Source);
     //h.SetAttribute(".", "Key", editor.VariableKey);
     return h.GetElement(".");
 }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:9,代码来源:UUIDVariable.cs

示例4: GetSample

        public XmlElement GetSample()
        {
            XmlHelper h = new XmlHelper("<Converter />");
            h.SetAttribute(".", "Name", this.Name);
            h.SetAttribute(".", "Type", this.Type);

            h.AddElement(".", "Key", "decode_key");

            return h.GetElement(".");
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:10,代码来源:DecodeConverter.cs

示例5: GetSample

        public XmlElement GetSample()
        {
            XmlHelper h = new XmlHelper("<Converter />");
            h.SetAttribute(".", "Name", this.Name);
            h.SetAttribute(".", "Type", this.Type);

            h.AddElement(".", "InputFormat", DefaultInputFormat);
            h.AddElement(".", "OutputFormat", DefaultOutputFormat);

            return h.GetElement(".");
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:11,代码来源:DateFormatConverter.cs

示例6: GetXml

        internal XmlElement GetXml()
        {
            XmlHelper h = new XmlHelper("<Orders/>");
            h.SetAttribute(".", "Name", this.Name);
            h.SetAttribute(".", "Source", this.Source);

            foreach (Order order in this.Orders)
                h.AddElement(".", order.GetXml());

            return h.GetElement(".");
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:11,代码来源:OrderList.cs

示例7: GetXml

 public System.Xml.XmlElement GetXml()
 {
     LiteralVariableEditor editor = this.Editor as LiteralVariableEditor;
     XmlHelper h = new XmlHelper("<Variable/>");
     h.SetAttribute(".", "Name", editor.VariableName);
     h.SetAttribute(".", "Source", this.Source);
     
     XmlElement e = h.GetElement(".");
     XmlCDataSection section = e.OwnerDocument.CreateCDataSection(editor.VariableKey);
     e.AppendChild(section);
     return e;
 }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:12,代码来源:LiteralVariable.cs

示例8: GetXml

        internal XmlElement GetXml(ServiceAction serviceAction)
        {
            XmlHelper h = new XmlHelper("<FieldList/>");
            h.SetAttribute(".", "Name", this.Name);
            h.SetAttribute(".", "Source", this.Source);

            foreach (Field field in this.Fields)
            {
                h.AddElement(".", field.GetXml(serviceAction));
            }
            return h.GetElement(".");
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:12,代码来源:FieldList.cs

示例9: GetSample

        public XmlElement GetSample()
        {
            XmlHelper h = new XmlHelper("<Converter />");
            h.SetAttribute(".", "Name", this.Name);
            h.SetAttribute(".", "Type", this.Type);

            XmlElement e = h.AddElement(".", "Item", "return_value");
            e.SetAttribute("If", "get_value");

            h.AddElement(".", "Default", "no_match_default_value");

            return h.GetElement(".");
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:13,代码来源:MappingConverter.cs

示例10: GetXml

        public System.Xml.XmlElement GetXml()
        {
            SQLVariableEditor editor = this.Editor as SQLVariableEditor;
            XmlHelper h = new XmlHelper("<Variable/>");
            h.SetAttribute(".", "Name", editor.VariableName);
            h.SetAttribute(".", "Source", this.Source);

            XmlElement q = h.AddElement(".", "SqlQuery");
            XmlCDataSection section =  q.OwnerDocument.CreateCDataSection(editor.VariableKey);
            q.AppendChild(section);
            
            return h.GetElement(".");
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:13,代码来源:SQLVariable.cs

示例11: GetXml

        internal XmlElement GetXml()
        {
            XmlHelper h = new XmlHelper("<Pagination/>");
            h.SetAttribute(".", "Allow", this.AllowPagination.ToString());

            string max = string.Empty;
            if (this.MaxPageSize > 0)
            {
                max = this.MaxPageSize.ToString();
                h.SetAttribute(".", "MaxPageSize", max);
            }

            return h.GetElement(".");
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:14,代码来源:Pagination.cs

示例12: GetAuthElement

        public System.Xml.XmlElement GetAuthElement()
        {
            XmlHelper h = new XmlHelper("<Authentication/>");
            h.AddElement(".", "Basic");
            h.SetAttribute("Basic", "Enabled", chkBasic.Enabled.ToString());
            h.AddElement("Basic", "PasswordHashProvider");
            h.SetAttribute("Basic/PasswordHashProvider", "DriverClass", cbHashProvider.Text);
            h.AddElement("Basic", "UserInfoStorage");
            h.SetAttribute("Basic/UserInfoStorage", "Type", "Database");
            h.AddElement("Basic/UserInfoStorage", "DBSchema");
            XmlElement xml = h.AddElement("Basic/UserInfoStorage/DBSchema", "GetUserDataQuery");
            XmlCDataSection section = xml.OwnerDocument.CreateCDataSection(txtGetUserDataQuery.Text);
            xml.AppendChild(section);
            xml = h.AddElement("Basic/UserInfoStorage/DBSchema", "GetUserRolesQuery");
            section = xml.OwnerDocument.CreateCDataSection(txtGetUserRoleQuery.Text);
            xml.AppendChild(section);

            xml = h.AddElement(".", "Session");
            xml.SetAttribute("Enabled", chkSession.Checked.ToString());
            xml.SetAttribute("Timeout", txtTimeout.Text);

            h.AddElement(".", "Passport");
            h.SetAttribute("Passport", "Enabled", chkPassport.Enabled.ToString());
            h.AddElement("Passport", "Issuer");
            h.SetAttribute("Passport/Issuer", "Name", txtIssuer.Text);
            h.AddElement("Passport/Issuer", "CertificateProvider", txtCertProvider.Text);
            h.SetAttribute("Passport/Issuer/CertificateProvider", "Type", "HttpGet");

            if (rbEnable.Checked)
            {
                h.AddElement("Passport", "AccountLinking");
                h.SetAttribute("Passport/AccountLinking", "Type", "mapping");
                h.AddElement("Passport/AccountLinking", "TableName", cbALTable.Text);
                h.AddElement("Passport/AccountLinking", "UserNameField", cbUserNameField.Text);
                h.AddElement("Passport/AccountLinking", "MappingField", cboMappingField.Text);

                if (dgExtProp.Rows.Count > 0)
                    h.AddElement("Passport/AccountLinking", "Properties");

                foreach (DataGridViewRow row in dgExtProp.Rows)
                {
                    xml = h.AddElement("Passport/AccountLinking/Properties", "Property");
                    xml.SetAttribute("Field", row.Cells[colDBField.Name].Value.ToString());
                    xml.SetAttribute("Alias", row.Cells[colAlias.Name].Value.ToString());
                }
            }
            return h.GetElement(".");
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:48,代码来源:AdvAuthEditor.cs

示例13: GetAuthElement

 public System.Xml.XmlElement GetAuthElement()
 {
     XmlHelper h = new XmlHelper("<Authentication />");
     h.AddElement(".", "Public");
     h.SetAttribute("Public", "Enabled", "true");
     return h.GetElement(".");
 }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:7,代码来源:PublicAuthEditor.cs

示例14: Output

        public XmlElement Output()
        {
            XmlHelper h = new XmlHelper("<Converter />");
            h.SetAttribute(".", "Name", this.Name);
            h.SetAttribute(".", "Type", this.Type);
            
            foreach(string key in Map.Keys)
            {
                XmlElement e = h.AddElement(".", "Item", Map[key]);
                e.SetAttribute("If", key);
            }

            if(DefaultValue != null)
                h.AddElement(".", "Default", this.DefaultValue);

            return h.GetElement(".");
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:17,代码来源:MappingConverter.cs

示例15: DeployForm_Load

        private void DeployForm_Load(object sender, EventArgs e)
        {
            txtProvider.Text = MainForm.LoginArgs.LoginUser;
            dgCommand.Rows.Clear();

            //找看看有沒有前一版
            string localPath =  MainForm.CurrentProject.TryGetLocalPath();
            string path = Path.Combine(localPath, "udm.xml");
            string vstr = string.Empty;

            if (File.Exists(path))
            {
                rbExtend.Checked = true;
                XmlDocument doc = new XmlDocument();
                doc.Load(path);
                vstr = doc.DocumentElement.GetAttribute("Version");

                Version ver;
                if (!Version.TryParse(vstr, out ver))
                    ver = new Version();
                txtLastest.Text = ver.ToString();
                txtProvider.Text = doc.DocumentElement.GetAttribute("Provider");

                XmlHelper h = new XmlHelper(doc.DocumentElement);
                txtPreVerURL.Text = h.GetText("Release/@URL");
            }
            else
            {
                rbNew.Checked = true;
                txtLastest.Text = "無前版資訊";

                foreach (UDTTable table in MainForm.CurrentUDT.Tables)
                {
                    ImportTableCommand cmd = new ImportTableCommand();
                    XmlHelper h = new XmlHelper("<Command/>");
                    h.SetAttribute(".", "Type", cmd.Type);
                    h.AddElement(".", table.GetContent());

                    cmd.Result = h.GetElement(".");
                    this.AddCommand(cmd);
                }
            }            
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:43,代码来源:DeployForm.cs


注:本文中的XmlHelper.SetAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。