WriteComma() public method

public WriteComma ( ) : void
return void
Beispiel #1
0
        /// <summary>
        /// Serializes the crash binaries.
        /// </summary>
        /// <param name="binaries">The binaries.</param>
        /// <param name="writer">The writer.</param>
        private static void SerializeCrashBinaries(IList <CrashTelemetryBinary> binaries, JsonWriter writer)
        {
            bool first = true;

            foreach (CrashTelemetryBinary binary in binaries)
            {
                if (first == false)
                {
                    writer.WriteComma();
                }

                first = false;

                writer.WriteStartObject();

                writer.WriteProperty("startAddress", binary.StartAddress);
                writer.WriteProperty("endAddress", binary.EndAddress);
                writer.WriteProperty("name", binary.Name);
                writer.WriteProperty("cpuType", binary.CpuType);
                writer.WriteProperty("cpuSubType", binary.CpuSubType);
                writer.WriteProperty("uuid", binary.Uuid);
                writer.WriteProperty("path", binary.Path);

                writer.WriteEndObject();
            }
        }
Beispiel #2
0
        /// <summary>
        /// Serializes the crash threads.
        /// </summary>
        /// <param name="threads">The threads.</param>
        /// <param name="writer">The writer.</param>
        private static void SerializeCrashThreads(IList <CrashTelemetryThread> threads, JsonWriter writer)
        {
            bool first = true;

            foreach (CrashTelemetryThread thread in threads)
            {
                if (first == false)
                {
                    writer.WriteComma();
                }

                first = false;

                writer.WriteStartObject();

                writer.WriteProperty("id", thread.Id);
                writer.WritePropertyName("frames");
                {
                    writer.WriteStartArray();

                    JsonSerializer.SerializeCrashThreadFrames(thread.Frames, writer);

                    writer.WriteEndArray();
                }

                writer.WriteEndObject();
            }
        }
Beispiel #3
0
        /// <summary>
        /// Serializes the crash thread frames.
        /// </summary>
        /// <param name="frames">The frames.</param>
        /// <param name="writer">The writer.</param>
        private static void SerializeCrashThreadFrames(IList <CrashTelemetryThreadFrame> frames, JsonWriter writer)
        {
            bool first = true;

            foreach (CrashTelemetryThreadFrame frame in frames)
            {
                if (first == false)
                {
                    writer.WriteComma();
                }

                first = false;

                writer.WriteStartObject();

                writer.WriteProperty("address", frame.Address);
                writer.WriteProperty("symbol", frame.Symbol);
                writer.WriteProperty("registers", frame.Registers);

                writer.WriteEndObject();
            }
        }
        /// <summary>
        /// Serializes the crash binaries.
        /// </summary>
        /// <param name="binaries">The binaries.</param>
        /// <param name="writer">The writer.</param>
        private static void SerializeCrashBinaries(IList<CrashTelemetryBinary> binaries, JsonWriter writer)
        {
            bool first = true;
            foreach (CrashTelemetryBinary binary in binaries)
            {
                if (first == false)
                {
                    writer.WriteComma();
                }

                first = false;

                writer.WriteStartObject();

                writer.WriteProperty("startAddress", binary.StartAddress);
                writer.WriteProperty("endAddress", binary.EndAddress);
                writer.WriteProperty("name", binary.Name);
                writer.WriteProperty("cpuType", binary.CpuType);
                writer.WriteProperty("cpuSubType", binary.CpuSubType);
                writer.WriteProperty("uuid", binary.Uuid);
                writer.WriteProperty("path", binary.Path);

                writer.WriteEndObject();
            }
        }
        /// <summary>
        /// Serializes the crash thread frames.
        /// </summary>
        /// <param name="frames">The frames.</param>
        /// <param name="writer">The writer.</param>
        private static void SerializeCrashThreadFrames(IList<CrashTelemetryThreadFrame> frames, JsonWriter writer)
        {
            bool first = true;
            foreach (CrashTelemetryThreadFrame frame in frames)
            {
                if (first == false)
                {
                    writer.WriteComma();
                }

                first = false;

                writer.WriteStartObject();

                writer.WriteProperty("address", frame.Address);
                writer.WriteProperty("symbol", frame.Symbol);
                writer.WriteProperty("registers", frame.Registers);

                writer.WriteEndObject();
            }
        }
        /// <summary>
        /// Serializes the crash threads.
        /// </summary>
        /// <param name="threads">The threads.</param>
        /// <param name="writer">The writer.</param>
        private static void SerializeCrashThreads(IList<CrashTelemetryThread> threads, JsonWriter writer)
        {
            bool first = true;
            foreach (CrashTelemetryThread thread in threads)
            {
                if (first == false)
                {
                    writer.WriteComma();
                }

                first = false;

                writer.WriteStartObject();

                writer.WriteProperty("id", thread.Id);
                writer.WritePropertyName("frames");
                {
                    writer.WriteStartArray();

                    JsonSerializer.SerializeCrashThreadFrames(thread.Frames, writer);

                    writer.WriteEndArray();
                }

                writer.WriteEndObject();
            }
        }