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


C# System.WriteEndElement方法代码示例

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


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

示例1: buildXml

        public override void buildXml(System.Xml.XmlWriter xmlWriter)
        {
            xmlWriter.WriteStartElement("excel_couponSchedule");
                xmlWriter.WriteElementString("excel_type" , "excel_fixedCouponSchedule");

                base.buildXml(xmlWriter);

                xmlWriter.WriteStartElement("excel_fixedCouponSchedule");

                    xmlWriter.WriteElementString("eventDate", StringConverter.xmlDateTimeToDateString(this.eventDate_));
                    xmlWriter.WriteElementString("calculationStartDate", StringConverter.xmlDateTimeToDateString(this.calculationStartDate_));
                    xmlWriter.WriteElementString("calculationEndDate", StringConverter.xmlDateTimeToDateString(this.calculationEndDate_));
                    xmlWriter.WriteElementString("payoffDate", StringConverter.xmlDateTimeToDateString(this.payoffDate_));
                    xmlWriter.WriteElementString("description", this.description_);
                    xmlWriter.WriteElementString("vba_description", this.vba_description_);

                    //xmlWriter.WriteElementString("maturityDate" , StringConverter.xmlDateTimeToDateString(this.maturityDate_));
                    xmlWriter.WriteElementString("fixedRate", this.fixedRate_);

                    xmlWriter.WriteElementString("detailScheduleType" , this.detailScheduleType_);
                    
                    
                xmlWriter.WriteEndElement();
            xmlWriter.WriteEndElement();
        }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:25,代码来源:Excel_fixedCouponScheduleViewModel.cs

示例2: Graph

        /// <summary>
        /// Graph <paramref name="o"/> onto <paramref name="s"/>
        /// </summary>
        public void Graph(System.Xml.XmlWriter s, object o, DatatypeR2FormatterGraphResult result)
        {

            // Graph the base
            ANYFormatter baseFormatter = new ANYFormatter();
            baseFormatter.Graph(s, o, result);

            // Do not graph if null flavor is present
            if ((o as ANY).NullFlavor != null)
                return;

            var originalText = o as IOriginalText;

            // Write out the original text first
            if (originalText.OriginalText != null)
            {
                s.WriteStartElement("originalText", "urn:hl7-org:v3");
                var hostResult = this.Host.Graph(s, originalText.OriginalText);
                result.Code = hostResult.Code;
                result.AddResultDetail(hostResult.Details);
                s.WriteEndElement();
            }

            // Now the terms
            foreach (var term in (o as IEnumerable))
            {
                s.WriteStartElement("term", "urn:hl7-org:v3");

                var hostResult = this.Host.Graph(s, term as IGraphable);
                result.Code = hostResult.Code;
                result.AddResultDetail(hostResult.Details);
                s.WriteEndElement();
            }
        }
开发者ID:oneminot,项目名称:everest,代码行数:37,代码来源:QSSFormatter.cs

示例3: Graph

        /// <summary>
        /// Graph object <paramref name="o"/> onto <paramref name="s"/>
        /// </summary>
        public override void Graph(System.Xml.XmlWriter s, object o, DatatypeFormatterGraphResult result)
        {
            base.Graph(s, o, result);
            
            // Now graph the attributes
            Type eivlType = o.GetType();
            object eventValue = eivlType.GetProperty("Event").GetValue(o, null),
                offsetValue = eivlType.GetProperty("Offset").GetValue(o, null),
                operatorValue = eivlType.GetProperty("Operator").GetValue(o, null);

            // Append the attributes to the writer
            if ((o as ANY).NullFlavor != null)
                return; // Nothing to report
            if (operatorValue != null)
                s.WriteAttributeString("operator", Util.ToWireFormat(operatorValue));

            // Write elements
            if (eventValue != null)
            {
                s.WriteStartElement("event", "urn:hl7-org:v3");
                var hostResult = Host.Graph(s, (IGraphable)eventValue);
                result.AddResultDetail(hostResult.Details);
                s.WriteEndElement();
            }
            if (offsetValue != null)
            {
                s.WriteStartElement("offset", "urn:hl7-org:v3");
                var hostResult = Host.Graph(s, (IGraphable)offsetValue);
                result.AddResultDetail(hostResult.Details);
                s.WriteEndElement();
            }

        }
开发者ID:oneminot,项目名称:everest,代码行数:36,代码来源:EIVLFormatter.cs

示例4: ExportData

		protected override void ExportData(System.Xml.XmlWriter writer, ExportContext context)
		{
            var data = GetData();
            var node = data as Node;
			if (node != null)
			{
				writer.WriteStartElement("Path");
				writer.WriteString(node.Path);
                if (context != null)
                    context.AddReference(node.Path);
				writer.WriteEndElement();
				return;
			}

            var nodes = data as IEnumerable;
            if (nodes != null)
			{
                foreach (Node item in nodes)
				{
					writer.WriteStartElement("Path");
					writer.WriteString(item.Path);
                    if (context != null)
                        context.AddReference(item.Path);
					writer.WriteEndElement();
				}
				return;
			}

			throw ExportNotImplementedException(GetData());
		}
开发者ID:jhuntsman,项目名称:FlexNet,代码行数:30,代码来源:ReferenceField.cs

示例5: RenderContent

        /// <summary>
        /// Ouputs content to response
        /// </summary>
        /// <param name="xWriter">XmlWriter object to render content to</param>
        protected override void RenderContent(System.Xml.XmlWriter xWriter)
        {
            xWriter.WriteStartElement("row");
            if (!string.IsNullOrEmpty(this.ID))
                xWriter.WriteAttributeString("id", this.ID);

            if (this.HasChildren)
                xWriter.WriteAttributeString("xmlkids", "1");
            
            //write custom attribs
            foreach (KeyValuePair<string, string> pair in this.CustomAttribs)
                xWriter.WriteAttributeString(pair.Key, pair.Value);

            int cellIndex = 0;
            foreach (KeyValuePair<string, string> pair in this.DataFields)
                if (!this.ExtraColumnNames.Contains(pair.Key))
                {
                    xWriter.WriteStartElement("cell");
                    if (cellIndex == 0 && !string.IsNullOrEmpty(this.Image))
                        xWriter.WriteAttributeString("image", this.Image);
                    xWriter.WriteCData(pair.Value);
                    xWriter.WriteEndElement();
                    cellIndex++;
                }

            foreach (dhtmlxTreeGridDataItem childItem in this.ChildRows)
                childItem.Render(xWriter);

            xWriter.WriteEndElement();
        }
开发者ID:williams55,项目名称:clinic-doctor,代码行数:34,代码来源:dhtmlxTreeGridDataItem.cs

示例6: ExportData

		public void ExportData(System.Xml.XmlWriter writer)
		{
			DbInfo database = GetDbInfo();
			writer.WriteStartElement("database");
			writer.WriteElementString("productVersion", database.ProductVersion);
			writer.WriteElementString("servicePack", database.ServicePack);
			writer.WriteElementString("productEdition", database.ProductEdition);
			writer.WriteElementString("softwarePlatform", database.SoftwarePlatform);
			writer.WriteStartElement("backups");
			foreach (BackupInfo backup in database.Backups) {
				writer.WriteStartElement("backup");
				writer.WriteElementString("name", backup.Name);
				writer.WriteElementString("backupType", backup.BackupType);
				writer.WriteElementString("size", backup.Size.ToString());
				writer.WriteElementString("startDate", backup.StartDate.ToString());
				writer.WriteElementString("finishDate", backup.FinishDate.ToString());
				writer.WriteEndElement();
			}
			writer.WriteEndElement();
			writer.WriteStartElement("files");
			foreach (DbFileInfo dbFile in database.Files) {
				writer.WriteStartElement("file");
				writer.WriteElementString("name", dbFile.Name);
				writer.WriteElementString("fileType", dbFile.FileType);
				writer.WriteElementString("shortFileName", dbFile.ShortFileName);
				writer.WriteElementString("fileName", dbFile.FileName);
				writer.WriteElementString("size", dbFile.Size.ToString());
				writer.WriteElementString("megabytes", dbFile.Megabytes.ToString());
				writer.WriteEndElement();
			}
			writer.WriteEndElement();
			writer.WriteEndElement();
		}
开发者ID:jackiechou,项目名称:thegioicuaban.com,代码行数:33,代码来源:DatabaseController.cs

示例7: RenderContent

        /// <summary>
        /// Outputs content into XmlWriter
        /// </summary>
        /// <param name="xWriter">XmlWriter to render</param>
        protected override void RenderContent(System.Xml.XmlWriter xWriter)
        {
            xWriter.WriteStartElement("event");
            //id
            if (!string.IsNullOrEmpty(this.ID))
                xWriter.WriteAttributeString("id", this.ID);
            //custom attribs
            foreach (KeyValuePair<string, string> entry in this.CustomAttribs)
                xWriter.WriteAttributeString(entry.Key, entry.Value);
            //start date
            xWriter.WriteStartElement("start_date");
            if (this.StartDate.HasValue)
                xWriter.WriteCData(this.StartDate.Value.ToString(Tools.DateFormat));
            xWriter.WriteEndElement();
            //end_date
            xWriter.WriteStartElement("end_date");
            if (this.FinishDate.HasValue)
                xWriter.WriteCData(this.FinishDate.Value.ToString(Tools.DateFormat));
            xWriter.WriteEndElement();
            
            //details fields
            foreach (string fieldName in this.DataFields.Keys)
            {
                xWriter.WriteStartElement(fieldName);
                xWriter.WriteCData(this.DataFields[fieldName]);
                xWriter.WriteEndElement();
            }

            xWriter.WriteEndElement();
        }
开发者ID:williams55,项目名称:clinic-doctor,代码行数:34,代码来源:dhtmlxSchedulerDataItem.cs

示例8: SaveContent

        protected override void SaveContent(System.Xml.XmlWriter writer)
        {
            writer.WriteStartElement("table", SpreadsheetNamespaces.Main.Value);
            //WriteRequiredNamespaces(writer);

            writer.WriteAttributeString("id", _id.ToString());
            writer.WriteAttributeString("name", _tableName);
            writer.WriteAttributeString("displayName", DisplayName);
            writer.WriteAttributeString("ref", string.Format("{0}:{1}",Formatting.ColRowFormat((int)_tl.X+1,(int)_tl.Y),Formatting.ColRowFormat((int)_br.X+1,(int)_br.Y)));
            writer.WriteAttributeString("totalsRowShown", ShowTotalsRow ? "1" : "0");

            writer.WriteStartElement("autoFilter");
            writer.WriteAttributeString("ref", string.Format("{0}:{1}", Formatting.ColRowFormat((int)_tl.X+1, (int)_tl.Y), Formatting.ColRowFormat((int)_br.X+1, (int)_br.Y)));
            writer.WriteEndElement();

            writer.WriteStartElement("tableColumns");
            writer.WriteAttributeString("count", TableColumns.Length.ToString());
            foreach (var col in TableColumns)
            {
                col.Save(writer);
            }
            writer.WriteEndElement();

            TableStyle.Save(writer);

            writer.WriteEndElement();
        }
开发者ID:BenJoyenConseil,项目名称:planmyway,代码行数:27,代码来源:TablePart.cs

示例9: buildXml

        public override void buildXml(System.Xml.XmlWriter xmlWriter)
        {
            xmlWriter.WriteStartElement("excel_underlyingCalcID");

                if (this.attributeValue_ != "")
                {
                    xmlWriter.WriteAttributeString("usingType", this.attributeValue_);
                }

                xmlWriter.WriteElementString("excel_type" , "excel_averageUnderlyingCalcID");
                xmlWriter.WriteStartElement("excel_averageUnderlyingCalcID");

                    xmlWriter.WriteElementString("eventDate", this.eventDate_.ToString(StringFormat.XmlDateFormat_));
                    foreach (var item in this.excel_selectedUnderlyingViewModel_)
                    {
                        item.buildXml(xmlWriter);
                    }    

                    foreach (var item in this.weight_)
                    {
                        xmlWriter.WriteElementString("weight", item);
                    }
                    
                xmlWriter.WriteEndElement();
            xmlWriter.WriteEndElement();
        }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:26,代码来源:Excel_averageUnderlyingCalcIDViewModel.cs

示例10: Graph

        /// <summary>
        /// Graph object <paramref name="o"/> onto stream <paramref name="s"/>
        /// </summary>
        /// <param name="s">The stream to graph to</param>
        /// <param name="o">The object to graph</param>
        public override void Graph(System.Xml.XmlWriter s, object o, DatatypeFormatterGraphResult result)
        {

            base.Graph(s, o, result); // Graph the base data


            // If there is no null flavor then graph the rest of the object
            if (((ANY)o).IsNull)
                return;

            object invertedValue = o.GetType().GetProperty("Inverted").GetValue(o, null),
                nameValue = o.GetType().GetProperty("Name").GetValue(o, null),
                valueValue = o.GetType().GetProperty("Value").GetValue(o, null);

            // Graph the structural attributes
            s.WriteAttributeString("inverted", Util.ToWireFormat(invertedValue));

            // Graph the non-structural elements
            if (nameValue != null)
            {
                s.WriteStartElement("name", "urn:hl7-org:v3");
                var hostResult = this.Host.Graph(s, nameValue as IGraphable);
                result.AddResultDetail(hostResult.Details);
                s.WriteEndElement(); // end name
            }
            if (valueValue != null)
            {
                s.WriteStartElement("value", "urn:hl7-org:v3");
                var hostResult = this.Host.Graph(s, valueValue as IGraphable);
                result.AddResultDetail(hostResult.Details);
                s.WriteEndElement(); // end value
            }

        }
开发者ID:oneminot,项目名称:everest,代码行数:39,代码来源:CRFormatter.cs

示例11: buildXml

 public override void buildXml(System.Xml.XmlWriter xmlWriter)
 {
     xmlWriter.WriteStartElement("returnCalculation");
         xmlWriter.WriteElementString("type" , "zeroReturnCal");
         xmlWriter.WriteStartElement("zeroReturnCal");
         xmlWriter.WriteEndElement();
     xmlWriter.WriteEndElement();
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:8,代码来源:ZeroReturnCalViewModel.cs

示例12: buildXml

 public  void buildXml(System.Xml.XmlWriter xmlWriter)
 {
     xmlWriter.WriteStartElement("iXmlData");
         xmlWriter.WriteElementString("type" , "evaluationCurves");
         xmlWriter.WriteStartElement("evaluationCurves");
         xmlWriter.WriteEndElement();
     xmlWriter.WriteEndElement();
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:8,代码来源:EvaluationCurvesViewModel.cs

示例13: buildXml

 public override void buildXml(System.Xml.XmlWriter xmlWriter)
 {
     xmlWriter.WriteStartElement("messageBody");
         xmlWriter.WriteElementString("msg_type", "gridCalculationStart");
         xmlWriter.WriteStartElement("gridCalculationStart");
         xmlWriter.WriteEndElement();
     xmlWriter.WriteEndElement();
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:8,代码来源:GridCalculationStartViewModel.cs

示例14: buildXml

 public override void buildXml(System.Xml.XmlWriter xmlWriter)
 {
     xmlWriter.WriteStartElement("messageBody");
     xmlWriter.WriteElementString("msg_type", "maturityNotification");
         xmlWriter.WriteStartElement("maturityNotification");
         xmlWriter.WriteEndElement();
     xmlWriter.WriteEndElement();
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:8,代码来源:MaturityNotificationViewModel.cs

示例15: buildXml

 public override void buildXml(System.Xml.XmlWriter xmlWriter)
 {
     xmlWriter.WriteStartElement("excel_additionalOption");
         xmlWriter.WriteElementString("excel_type" , "excel_puttableOption");
         xmlWriter.WriteStartElement("excel_puttableOption");
             xmlWriter.WriteElementString("optionType", this.optionType_);
         xmlWriter.WriteEndElement();
     xmlWriter.WriteEndElement();
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:9,代码来源:Excel_puttableOptionViewModel.cs


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