コード例 #1
0
ファイル: JsonWriter.cs プロジェクト: irvinesunday/EdmUtils
        /// <summary>
        /// Writes a separator of a value if it's needed for the next value to be written.
        /// </summary>
        protected override void WriteValueSeparator()
        {
            if (Scopes.Count == 0)
            {
                return;
            }

            var currentScope = Scopes.Peek();

            if (currentScope.Type == ScopeType.Array)
            {
                if (currentScope.ObjectCount != 0)
                {
                    Writer.Write(WriterConstants.ArrayElementSeparator);
                }

                Writer.WriteLine();
                WriteIndentation();
                currentScope.ObjectCount++;
            }
        }
コード例 #2
0
ファイル: Mira.cs プロジェクト: Pirmayr/Mira
 public void Add(TK key, TV value) => scopes.Peek().Add(key, value);