コード例 #1
0
ファイル: TomlTableWriter.cs プロジェクト: zanedp/Nett
        internal static string WriteTomlFragment(TomlTableArray array)
        {
            return(WriteIntoStream(WriteTomlTableArray));

            void WriteTomlTableArray(FormattingStreamWriter stream)
            {
                var writer = new TomlTableWriter(stream, array.Root.Settings);

                writer.WriteTomlTableArray(string.Empty, KeyNotAvailable, array);
            }
        }
コード例 #2
0
ファイル: TomlTableWriter.cs プロジェクト: zanedp/Nett
        internal static string WriteTomlFragment(TomlTable table)
        {
            return(table.TableType == TomlTable.TableTypes.Inline
                ? WriteIntoStream(WriteInlineTable)
                : WriteIntoStream(WriteTable));

            void WriteInlineTable(FormattingStreamWriter stream)
            {
                var writer = new TomlInlineTableWriter(stream, table.Root.Settings);

                writer.WriteInlineTableBody(table);
            }

            void WriteTable(FormattingStreamWriter stream)
            {
                var writer = new TomlTableWriter(stream, table.Root.Settings);

                writer.WriteToml(table);
            }
        }