8 instantiations of MetricType
Microsoft.Gen.Metrics (2)
Parser.cs (2)
135metricType ??= new MetricType 157currentMetricClass.Parent = new MetricType
Microsoft.Gen.Metrics.Unit.Tests (6)
EmitterTests.cs (5)
63var metricClass = new MetricType 102var metricClass = new MetricType 142var metricClass = new MetricType 180var metricClass = new MetricType 290var metricClass = new MetricType
MetricTypeTests.cs (1)
14var instance = new MetricType();
32 references to MetricType
Microsoft.Gen.Metrics (21)
Emitter.cs (8)
21public string EmitMetrics(IReadOnlyList<MetricType> metricTypes, CancellationToken cancellationToken) 23Dictionary<string, List<MetricType>> metricClassesDict = []; 24foreach (var cl in metricTypes) 49private void GenTypeByNamespace(string nspace, IEnumerable<MetricType> metricTypes, CancellationToken cancellationToken) 59foreach (var metricClass in metricTypes.OrderBy(static x => x.Name)) 80private void GenType(MetricType metricType, string nspace) 101private void GenInstrumentCreateMethods(MetricType metricType, string nspace) 103var parent = metricType.Parent;
MetricFactoryEmitter.cs (6)
18public string Emit(IReadOnlyList<MetricType> metricClasses, CancellationToken cancellationToken) 20Dictionary<string, List<MetricType>> metricClassesDict = []; 21foreach (var cl in metricClasses) 61private void GenMetricFactoryByNamespace(string nspace, IEnumerable<MetricType> metricClasses, CancellationToken cancellationToken) 74foreach (var metricClass in metricClasses.OrderBy(static x => x.Name)) 99private void GenMetricFactory(MetricType metricType, string nspace)
Model\MetricType.cs (1)
16public MetricType? Parent;
Parser.cs (6)
58public IReadOnlyList<MetricType> GetMetricClasses(IEnumerable<TypeDeclarationSyntax> types) 63return Array.Empty<MetricType>(); 66var results = new List<MetricType>(); 77MetricType? metricType = null; 146MetricType currentMetricClass = metricType; 191private static void UpdateMetricKeywordIfRequired(TypeDeclarationSyntax? typeDeclaration, MetricType metricType)
Microsoft.Gen.Metrics.Unit.Tests (11)
EmitterTests.cs (10)
63var metricClass = new MetricType 94emitter.EmitMetrics(new List<MetricType> { metricClass }, cancellationToken: default)); 102var metricClass = new MetricType 134emitter.Emit(new List<MetricType> { metricClass }, cancellationToken: default)); 142var metricClass = new MetricType 172var result = emitter.Emit(new List<MetricType> { metricClass }, cancellationToken: default); 180var metricClass = new MetricType 210var result = emitter.Emit(new List<MetricType> { metricClass }, cancellationToken: default); 290var metricClass = new MetricType 321return new MetricFactoryEmitter().Emit(new List<MetricType> { metricClass }, cancellationToken: default);
MetricTypeTests.cs (1)
14var instance = new MetricType();