/// <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("event"); writer.WriteTelemetryName(this.Name); writer.WriteTimestamp(this.Timestamp); writer.WriteContext(this.Context); writer.WriteProperties(this.Context.Properties); writer.WriteMetrics(this.Metrics); writer.WriteEndInsert(); }