/// <summary> /// Serializes to the specified writer. /// </summary> /// <param name="writer">The writer.</param> public void Serialize(ISqlWriter writer) { if (writer == null) { throw new ArgumentNullException("writer"); } writer.WriteBeginInsert(); writer.WriteTelemetryType("metric"); writer.WriteTelemetryName(this.Name); writer.WriteTimestamp(this.Timestamp); writer.WriteContext(this.Context); writer.WriteProperties(this.Context.Properties); writer.WriteValue(this.Value); writer.WriteEndInsert(); }
/// <summary> /// Serializes to the specified writer. /// </summary> /// <param name="writer">The writer.</param> public void Serialize(ISqlWriter writer) { if (writer == null) { throw new ArgumentNullException("writer"); } writer.WriteBeginInsert(); writer.WriteTelemetryType("exception"); writer.WriteTelemetryName(this.Exception.Source); writer.WriteMessage(this.Exception.Message); writer.WriteTimestamp(this.Timestamp); writer.WriteContext(this.Context); writer.WriteProperties(this.Context.Properties); writer.WriteMetrics(this.Metrics); writer.WriteEndInsert(); }