Exemplo n.º 1
0
        /// <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();
        }