コード例 #1
0
        private void WriteRow(SharpRow row)
        {
            var nodeRow = row as SharpNodeRow;

            if (nodeRow != null)
            {
                if (nodeRow is SharpValueRow)
                {
                    WriteValueRow(nodeRow as SharpValueRow);
                }
                else
                {
                    WriteNodeRow(nodeRow);
                }
                return;
            }

            var metaRow = row as SharpMetaRow;

            if (metaRow != null)
            {
                if (metaRow is SharpMetaCommentRow)
                {
                    _writer.WriteLine(metaRow.ToString());
                }
                else if (metaRow is SharpMetaParameterRow)
                {
                    WriteMetaParameterRow(metaRow as SharpMetaParameterRow);
                }
                else if (metaRow is SharpMetaNodeRow)
                {
                    _writer.WriteLine(metaRow.ToString());
                }
            }
        }
コード例 #2
0
ファイル: XmlWriter.cs プロジェクト: mattnieland/Helpers.Net
        private void WriteRow(SharpRow row)
        {
            if (!(row is SharpMetaCommentRow) && _commentBlock.Count > 0)
            {
                WriteCommentBlock();
            }


            var nodeRow = row as SharpNodeRow;

            if (nodeRow != null)
            {
                if (nodeRow is SharpValueRow)
                {
                    WriteValueRow(nodeRow as SharpValueRow);
                }
                else
                {
                    WriteNodeRow(nodeRow);
                }
                return;
            }

            var metaRow = row as SharpMetaRow;

            if (metaRow != null)
            {
                if (metaRow is SharpMetaCommentRow)
                {
                    _commentBlock.Add(metaRow as SharpMetaCommentRow);
                }
                else if (metaRow is SharpMetaParameterRow)
                {
                    WriteMetaParameterRow(metaRow as SharpMetaParameterRow);
                }
            }
        }
コード例 #3
0
 public void Remove(SharpRow row)
 {
     _deleteRows.Add(row);
 }
コード例 #4
0
 public void Add(SharpRow row)
 {
     row.Collection = this;
     _insertRows.Add(row);
 }