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


C# Serializer.WriteComment方法代码示例

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


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

示例1: Serialize

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

      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.headingFormat.IsNull)
        serializer.WriteSimpleAttribute("HeadingFormat", HeadingFormat);

      if (!this.leftPadding.IsNull)
        serializer.WriteSimpleAttribute("LeftPadding", LeftPadding);

      if (!this.rightPadding.IsNull)
        serializer.WriteSimpleAttribute("RightPadding", RightPadding);

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

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

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

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

      serializer.EndAttributes(pos);

      // columns has no content
    }
开发者ID:DavidS,项目名称:MigraDoc,代码行数:41,代码来源:Column.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 Rows into DDL.
    /// </summary>
    internal override void Serialize(Serializer serializer)
    {
      serializer.WriteComment(this.comment.Value);
      serializer.WriteLine("\\rows");

      int pos = serializer.BeginAttributes();

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

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

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

      if (!this.leftIndent.IsNull)
        serializer.WriteSimpleAttribute("LeftIndent", this.LeftIndent);

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

      serializer.EndAttributes(pos);

      serializer.BeginContent();
      int rows = Count;
      if (rows > 0)
      {
        for (int row = 0; row < rows; row++)
          this[row].Serialize(serializer);
      }
      else
        serializer.WriteComment("Invalid - no rows defined. Table will not render.");
      serializer.EndContent();
    }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:38,代码来源:Rows.cs

示例4: Serialize

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

      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.mergeDown.IsNull)
        serializer.WriteSimpleAttribute("MergeDown", this.MergeDown);

      if (!this.mergeRight.IsNull)
        serializer.WriteSimpleAttribute("MergeRight", this.MergeRight);

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

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

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

      serializer.EndAttributes(pos);

      pos = serializer.BeginContent();
      if (!this.IsNull("Elements"))
        this.elements.Serialize(serializer);
      serializer.EndContent(pos);
    }
开发者ID:vronikp,项目名称:EventRegistration,代码行数:38,代码来源:Cell.cs

示例5: 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

示例6: Serialize

        /// <summary>
        /// Converts Table into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteComment(_comment.Value);

            serializer.WriteLine("\\table");

            int pos = serializer.BeginAttributes();

            if (_style.Value != String.Empty)
                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 (!IsNull("Borders"))
                _borders.Serialize(serializer, null);

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

            serializer.EndAttributes(pos);

            serializer.BeginContent();
            Columns.Serialize(serializer);
            Rows.Serialize(serializer);
            serializer.EndContent();
        }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:42,代码来源:Table.cs

示例7: Serialize

    /// <summary>
    /// Converts Table into DDL.
    /// </summary>
    internal override void Serialize(Serializer serializer)
    {
      serializer.WriteComment(this.comment.Value);

      serializer.WriteLine("\\table");

      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.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("Borders"))
        this.borders.Serialize(serializer, null);

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

      serializer.EndAttributes(pos);

      serializer.BeginContent();
      this.Columns.Serialize(serializer);
      this.Rows.Serialize(serializer);
      serializer.EndContent();
    }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:42,代码来源:Table.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 Cell into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteComment(_comment.Value);
            serializer.WriteLine("\\cell");

            int pos = serializer.BeginAttributes();

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

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

            if (!_mergeDown.IsNull)
                serializer.WriteSimpleAttribute("MergeDown", MergeDown);

            if (!_mergeRight.IsNull)
                serializer.WriteSimpleAttribute("MergeRight", MergeRight);

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

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

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

            if (_roundedCorner != RoundedCorner.None)
                serializer.WriteSimpleAttribute("RoundedCorner", RoundedCorner);

            serializer.EndAttributes(pos);

            pos = serializer.BeginContent();
            if (!IsNull("Elements"))
                _elements.Serialize(serializer);
            serializer.EndContent(pos);
        }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:41,代码来源:Cell.cs


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