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


C# Serializer.BeginContent方法代码示例

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


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

示例1: Serialize

 /// <summary>
 /// Converts LineFormat into DDL.
 /// </summary>
 internal override void Serialize(Serializer serializer)
 {
     int pos = serializer.BeginContent("LineFormat");
     if (!_visible.IsNull)
         serializer.WriteSimpleAttribute("Visible", Visible);
     if (!_style.IsNull)
         serializer.WriteSimpleAttribute("Style", Style);
     if (!_dashStyle.IsNull)
         serializer.WriteSimpleAttribute("DashStyle", DashStyle);
     if (!_width.IsNull)
         serializer.WriteSimpleAttribute("Width", Width);
     if (!_color.IsNull)
         serializer.WriteSimpleAttribute("Color", Color);
     serializer.EndContent();
 }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:18,代码来源:LineFormat.cs

示例2: Serialize

    /// <summary>
    /// Converts Row into DDL.
    /// </summary>
    internal override void Serialize(Serializer serializer)
    {
      serializer.WriteComment(this.comment.Value);
      serializer.WriteLine("\\row");

      int pos = serializer.BeginAttributes();

      if (this.style.Value != String.Empty)
        serializer.WriteSimpleAttribute("Style", this.Style);

      if (!this.IsNull("Format"))
        this.format.Serialize(serializer, "Format", null);

      if (!this.height.IsNull)
        serializer.WriteSimpleAttribute("Height", this.Height);

      if (!this.heightRule.IsNull)
        serializer.WriteSimpleAttribute("HeightRule", this.HeightRule);

      if (!this.topPadding.IsNull)
        serializer.WriteSimpleAttribute("TopPadding", this.TopPadding);

      if (!this.bottomPadding.IsNull)
        serializer.WriteSimpleAttribute("BottomPadding", this.BottomPadding);

      if (!this.headingFormat.IsNull)
        serializer.WriteSimpleAttribute("HeadingFormat", this.HeadingFormat);

      if (!this.verticalAlignment.IsNull)
        serializer.WriteSimpleAttribute("VerticalAlignment", this.VerticalAlignment);

      if (!this.keepWith.IsNull)
        serializer.WriteSimpleAttribute("KeepWith", this.KeepWith);

      //Borders & Shading
      if (!this.IsNull("Borders"))
        this.borders.Serialize(serializer, null);

      if (!this.IsNull("Shading"))
        this.shading.Serialize(serializer);

      serializer.EndAttributes(pos);

      serializer.BeginContent();
      if (!IsNull("Cells"))
        this.cells.Serialize(serializer);
      serializer.EndContent();
    }
开发者ID:DavidS,项目名称:MigraDoc,代码行数:51,代码来源:Row.cs

示例3: Serialize

    /// <summary>
    /// Converts Point into DDL.
    /// </summary>
    internal override void Serialize(Serializer serializer)
    {
      if (!this.IsNull("LineFormat") || !this.IsNull("FillFormat"))
      {
        serializer.WriteLine("");
        serializer.WriteLine("\\point");
        int pos = serializer.BeginAttributes();

        if (!this.IsNull("LineFormat"))
          this.lineFormat.Serialize(serializer);
        if (!this.IsNull("FillFormat"))
          this.fillFormat.Serialize(serializer);

        serializer.EndAttributes(pos);
        serializer.BeginContent();
        serializer.WriteLine(this.Value.ToString(System.Globalization.CultureInfo.InvariantCulture));
        serializer.EndContent();
      }
      else
        serializer.Write(this.Value.ToString(System.Globalization.CultureInfo.InvariantCulture));

      serializer.Write(", ");
    }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:26,代码来源:Point.cs

示例4: Serialize

        /// <summary>
        /// Converts Columns into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteComment(_comment.Value);
            serializer.WriteLine("\\columns");

            int pos = serializer.BeginAttributes();

            if (!_width.IsNull)
                serializer.WriteSimpleAttribute("Width", Width);

            serializer.EndAttributes(pos);

            serializer.BeginContent();
            int clms = Count;
            if (clms > 0)
            {
                for (int clm = 0; clm < clms; clm++)
                    this[clm].Serialize(serializer);
            }
            else
                serializer.WriteComment("Invalid - no columns defined. Table will not render.");
            serializer.EndContent();
        }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:26,代码来源:Columns.cs

示例5: Serialize

        /// <summary>
        /// Converts Chart into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteLine("\\chart(" + Type + ")");
            int pos = serializer.BeginAttributes();

            base.Serialize(serializer);
            if (!_displayBlanksAs.IsNull)
                serializer.WriteSimpleAttribute("DisplayBlanksAs", DisplayBlanksAs);
            if (!_pivotChart.IsNull)
                serializer.WriteSimpleAttribute("PivotChart", PivotChart);
            if (!_hasDataLabel.IsNull)
                serializer.WriteSimpleAttribute("HasDataLabel", HasDataLabel);

            if (!_style.IsNull)
                serializer.WriteSimpleAttribute("Style", Style);
            if (!IsNull("Format"))
                _format.Serialize(serializer, "Format", null);
            if (!IsNull("DataLabel"))
                _dataLabel.Serialize(serializer);
            serializer.EndAttributes(pos);

            serializer.BeginContent();

            if (!IsNull("PlotArea"))
                _plotArea.Serialize(serializer);
            if (!IsNull("HeaderArea"))
                _headerArea.Serialize(serializer);
            if (!IsNull("FooterArea"))
                _footerArea.Serialize(serializer);
            if (!IsNull("TopArea"))
                _topArea.Serialize(serializer);
            if (!IsNull("BottomArea"))
                _bottomArea.Serialize(serializer);
            if (!IsNull("LeftArea"))
                _leftArea.Serialize(serializer);
            if (!IsNull("RightArea"))
                _rightArea.Serialize(serializer);

            if (!IsNull("XAxis"))
                _xAxis.Serialize(serializer);
            if (!IsNull("YAxis"))
                _yAxis.Serialize(serializer);
            if (!IsNull("ZAxis"))
                _zAxis.Serialize(serializer);

            if (!IsNull("SeriesCollection"))
                _seriesCollection.Serialize(serializer);
            if (!IsNull("XValues"))
                _xValues.Serialize(serializer);

            serializer.EndContent();
        }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:55,代码来源:Chart.cs

示例6: Serialize

        /// <summary>
        /// Converts TickLabels into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            int pos = serializer.BeginContent("TickLabels");

              if (!this.style.IsNull)
            serializer.WriteSimpleAttribute("Style", this.Style);

              if (this.font != null)
            this.font.Serialize(serializer);

              if (!this.format.IsNull)
            serializer.WriteSimpleAttribute("Format", this.Format);

              serializer.EndContent();
        }
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:18,代码来源:TickLabels.cs

示例7: Serialize

    /// <summary>
    /// Converts XSeries into DDL.
    /// </summary>
    internal override void Serialize(Serializer serializer)
    {
      serializer.WriteLine("\\xvalues");

      serializer.BeginContent();
      this.xSeriesElements.Serialize(serializer);
      serializer.WriteLine("");
      serializer.EndContent();
    }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:12,代码来源:XSeries.cs

示例8: Serialize

        /// <summary>
        /// Converts Row into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteComment(_comment.Value);
            serializer.WriteLine("\\row");

            int pos = serializer.BeginAttributes();

            if (_style.Value != String.Empty)
                serializer.WriteSimpleAttribute("Style", Style);

            if (!IsNull("Format"))
                _format.Serialize(serializer, "Format", null);

            if (!_height.IsNull)
                serializer.WriteSimpleAttribute("Height", Height);

            if (!_heightRule.IsNull)
                serializer.WriteSimpleAttribute("HeightRule", HeightRule);

            if (!_topPadding.IsNull)
                serializer.WriteSimpleAttribute("TopPadding", TopPadding);

            if (!_bottomPadding.IsNull)
                serializer.WriteSimpleAttribute("BottomPadding", BottomPadding);

            if (!_headingFormat.IsNull)
                serializer.WriteSimpleAttribute("HeadingFormat", HeadingFormat);

            if (!_verticalAlignment.IsNull)
                serializer.WriteSimpleAttribute("VerticalAlignment", VerticalAlignment);

            if (!_keepWith.IsNull)
                serializer.WriteSimpleAttribute("KeepWith", KeepWith);

            //Borders & Shading
            if (!IsNull("Borders"))
                _borders.Serialize(serializer, null);

            if (!IsNull("Shading"))
                _shading.Serialize(serializer);

            serializer.EndAttributes(pos);

            serializer.BeginContent();
            if (!IsNull("Cells"))
                _cells.Serialize(serializer);
            serializer.EndContent();
        }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:51,代码来源:Row.cs

示例9: Serialize

 /// <summary>
 /// Converts FillFormat into DDL.
 /// </summary>
 internal override void Serialize(Serializer serializer)
 {
     int pos = serializer.BeginContent("FillFormat");
       if (!this.visible.IsNull)
     serializer.WriteSimpleAttribute("Visible", this.Visible);
       if (!this.color.IsNull)
     serializer.WriteSimpleAttribute("Color", this.Color);
       serializer.EndContent();
 }
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:12,代码来源:FillFormat.cs

示例10: Serialize

        /// <summary>
        /// Converts Series into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteLine("\\series");

              int pos = serializer.BeginAttributes();

              if (!this.name.IsNull)
            serializer.WriteSimpleAttribute("Name", this.Name);

              if (!this.markerSize.IsNull)
            serializer.WriteSimpleAttribute("MarkerSize", this.MarkerSize);
              if (!this.markerStyle.IsNull)
            serializer.WriteSimpleAttribute("MarkerStyle", this.MarkerStyle);

              if (!this.markerBackgroundColor.IsNull)
            serializer.WriteSimpleAttribute("MarkerBackgroundColor", this.MarkerBackgroundColor);
              if (!this.markerForegroundColor.IsNull)
            serializer.WriteSimpleAttribute("MarkerForegroundColor", this.MarkerForegroundColor);

              if (!this.chartType.IsNull)
            serializer.WriteSimpleAttribute("ChartType", this.ChartType);

              if (!this.hasDataLabel.IsNull)
            serializer.WriteSimpleAttribute("HasDataLabel", this.HasDataLabel);

              if (!this.IsNull("LineFormat"))
            this.lineFormat.Serialize(serializer);
              if (!this.IsNull("FillFormat"))
            this.fillFormat.Serialize(serializer);
              if (!this.IsNull("DataLabel"))
            this.dataLabel.Serialize(serializer);

              serializer.EndAttributes(pos);

              serializer.BeginContent();
              this.seriesElements.Serialize(serializer);
              serializer.WriteLine("");
              serializer.EndContent();
        }
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:42,代码来源:Series.cs

示例11: Serialize

        /// <summary>
        /// Converts Chart into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteLine("\\chart(" + this.Type + ")");
              int pos = serializer.BeginAttributes();

              base.Serialize(serializer);
              if (!this.displayBlanksAs.IsNull)
            serializer.WriteSimpleAttribute("DisplayBlanksAs", this.DisplayBlanksAs);
              if (!this.pivotChart.IsNull)
            serializer.WriteSimpleAttribute("PivotChart", this.PivotChart);
              if (!this.hasDataLabel.IsNull)
            serializer.WriteSimpleAttribute("HasDataLabel", this.HasDataLabel);

              if (!this.style.IsNull)
            serializer.WriteSimpleAttribute("Style", this.Style);
              if (!this.IsNull("Format"))
            this.format.Serialize(serializer, "Format", null);
              if (!this.IsNull("DataLabel"))
            this.dataLabel.Serialize(serializer);
              serializer.EndAttributes(pos);

              serializer.BeginContent();

              if (!this.IsNull("PlotArea"))
            this.plotArea.Serialize(serializer);
              if (!this.IsNull("HeaderArea"))
            this.headerArea.Serialize(serializer);
              if (!this.IsNull("FooterArea"))
            this.footerArea.Serialize(serializer);
              if (!this.IsNull("TopArea"))
            this.topArea.Serialize(serializer);
              if (!this.IsNull("BottomArea"))
            this.bottomArea.Serialize(serializer);
              if (!this.IsNull("LeftArea"))
            this.leftArea.Serialize(serializer);
              if (!this.IsNull("RightArea"))
            this.rightArea.Serialize(serializer);

              if (!this.IsNull("XAxis"))
            this.xAxis.Serialize(serializer);
              if (!this.IsNull("YAxis"))
            this.yAxis.Serialize(serializer);
              if (!this.IsNull("ZAxis"))
            this.zAxis.Serialize(serializer);

              if (!this.IsNull("SeriesCollection"))
            this.seriesCollection.Serialize(serializer);
              if (!this.IsNull("XValues"))
            this.xValues.Serialize(serializer);

              serializer.EndContent();
        }
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:55,代码来源:Chart.cs

示例12: Serialize

        /// <summary>
        /// Converts TextArea into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            Chart chartObject = _parent as Chart;

            serializer.WriteLine("\\" + chartObject.CheckTextArea(this));
            int pos = serializer.BeginAttributes();

            if (!_style.IsNull)
                serializer.WriteSimpleAttribute("Style", Style);
            if (!IsNull("Format"))
                _format.Serialize(serializer, "Format", null);

            if (!_topPadding.IsNull)
                serializer.WriteSimpleAttribute("TopPadding", TopPadding);
            if (!_leftPadding.IsNull)
                serializer.WriteSimpleAttribute("LeftPadding", LeftPadding);
            if (!_rightPadding.IsNull)
                serializer.WriteSimpleAttribute("RightPadding", RightPadding);
            if (!_bottomPadding.IsNull)
                serializer.WriteSimpleAttribute("BottomPadding", BottomPadding);

            if (!_width.IsNull)
                serializer.WriteSimpleAttribute("Width", Width);
            if (!_height.IsNull)
                serializer.WriteSimpleAttribute("Height", Height);

            if (!_verticalAlignment.IsNull)
                serializer.WriteSimpleAttribute("VerticalAlignment", VerticalAlignment);

            if (!IsNull("LineFormat"))
                _lineFormat.Serialize(serializer);
            if (!IsNull("FillFormat"))
                _fillFormat.Serialize(serializer);

            serializer.EndAttributes(pos);

            serializer.BeginContent();
            if (_elements != null)
                _elements.Serialize(serializer);
            serializer.EndContent();
        }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:44,代码来源:TextArea.cs

示例13: Serialize

    /// <summary>
    /// Converts PlotArea into DDL.
    /// </summary>
    internal override void Serialize(Serializer serializer)
    {
      serializer.WriteLine("\\plotarea");
      int pos = serializer.BeginAttributes();

      if (!this.topPadding.IsNull)
        serializer.WriteSimpleAttribute("TopPadding", this.TopPadding);
      if (!this.leftPadding.IsNull)
        serializer.WriteSimpleAttribute("LeftPadding", this.LeftPadding);
      if (!this.rightPadding.IsNull)
        serializer.WriteSimpleAttribute("RightPadding", this.RightPadding);
      if (!this.bottomPadding.IsNull)
        serializer.WriteSimpleAttribute("BottomPadding", this.BottomPadding);

      if (!this.IsNull("LineFormat"))
        this.lineFormat.Serialize(serializer);
      if (!this.IsNull("FillFormat"))
        this.fillFormat.Serialize(serializer);

      serializer.EndAttributes(pos);

      serializer.BeginContent();
      serializer.EndContent();
    }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:27,代码来源:PlotArea.cs

示例14: Serialize

        /// <summary>
        /// Converts AxisTitle into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            int pos = serializer.BeginContent("Title");

              if (!this.style.IsNull)
            serializer.WriteSimpleAttribute("Style", this.Style);

              if (!this.IsNull("Font"))
            this.font.Serialize(serializer);

              if (!this.orientation.IsNull)
            serializer.WriteSimpleAttribute("Orientation", this.Orientation);

              if (!this.alignment.IsNull)
            serializer.WriteSimpleAttribute("Alignment", this.Alignment);

              if (!this.verticalAlignment.IsNull)
            serializer.WriteSimpleAttribute("VerticalAlignment", this.VerticalAlignment);

              if (!this.caption.IsNull)
            serializer.WriteSimpleAttribute("Caption", this.Caption);

              serializer.EndContent();
        }
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:27,代码来源:AxisTitle.cs

示例15: Serialize

 /// <summary>
 /// Converts FillFormat into DDL.
 /// </summary>
 internal override void Serialize(Serializer serializer)
 {
     serializer.BeginContent("FillFormat");
     if (!_visible.IsNull)
         serializer.WriteSimpleAttribute("Visible", Visible);
     if (!_color.IsNull)
         serializer.WriteSimpleAttribute("Color", Color);
     serializer.EndContent();
 }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:12,代码来源:FillFormat.cs


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