private static void AssertSerialize(
            string expectValue,
            ref StatsMetric statsMetric,
            string prefix)
        {
            var serializerHelper = new SerializerHelper(null);
            var serializer       = new MetricSerializer(serializerHelper, prefix);
            var serializedMetric = new SerializedMetric();

            serializer.SerializeTo(ref statsMetric, serializedMetric);
            Assert.AreEqual(expectValue, serializedMetric.ToString());
        }
Пример #2
0
 public void FlushStatsMetric(StatsMetric metric)
 {
     _serializer.SerializeTo(ref metric, _serializedMetric);
     _bufferBuilder.Add(_serializedMetric);
 }