public string Build(IMapper mapper) { var metricsDeclaration = new MetricsDeclarationV1 { Version = SpecVersion.v1.ToString(), AzureMetadata = _azureMetadata, MetricDefaults = _metricDefaults, Metrics = _metrics }; _v1Deserializer = V1DeserializerFactory.CreateDeserializer(); var configurationSerializer = new ConfigurationSerializer(NullLogger.Instance, mapper, _v1Deserializer); return(configurationSerializer.Serialize(metricsDeclaration)); }
public MetricsDeclarationProviderStub(string rawMetricsDeclaration, IMapper mapper) : base(null, new ConfigurationSerializer(NullLogger <ConfigurationSerializer> .Instance, mapper, V1DeserializerFactory.CreateDeserializer())) { _rawMetricsDeclaration = rawMetricsDeclaration; }
public MetricsDeclarationProviderStub(string rawMetricsDeclaration, IMapper mapper) : base(configuration: null, logger: NullLogger.Instance, mapper: mapper, v1Deserializer: V1DeserializerFactory.CreateDeserializer()) { _rawMetricsDeclaration = rawMetricsDeclaration; }