39 references to OutLn
Microsoft.Gen.Metrics (39)
Emitter.cs (26)
54OutLn($"namespace {nspace}"); 116OutLn(parentTypes[i]); 121OutLn($"{metricType.Modifiers} {metricType.Keyword} {metricType.Name} {metricType.Constraints}"); 190OutLn($"{accessModifier} sealed class {metricMethod.MetricTypeName}"); 191OutLn($"{{"); 192OutLn($" private readonly {typeDefinition} _{objectName};"); 194OutLn($" public {metricMethod.MetricTypeName}({typeDefinition} {objectName})"); 195OutLn($" {{"); 196OutLn($" _{objectName} = {objectName};"); 197OutLn($" }}"); 206OutLn($" {{"); 212OutLn($" if (!_{objectName}.Enabled)"); 213OutLn($" {{"); 214OutLn($" return;"); 215OutLn($" }}"); 221OutLn($" if (o == null)"); 222OutLn($" {{"); 223OutLn($" throw new global::System.ArgumentNullException(nameof(o));"); 224OutLn($" }}"); 232OutLn("var tagList = new global::System.Diagnostics.TagList"); 236OutLn("};"); 242OutLn($" _{objectName}.{recordStatement}(value{(tagListInit ? ", tagList" : string.Empty)});"); 243OutLn($" }}"); 244OutLn("}"); 300OutLn($"new global::System.Collections.Generic.KeyValuePair<string, object?>(\"{tagName}\", {paramName}),"); 322OutLn($"new global::System.Collections.Generic.KeyValuePair<string, object?>(\"{config.TagName}\", {access}),");
MetricFactoryEmitter.cs (10)
64OutLn($"namespace {nspace}"); 69OutLn("internal static partial class GeneratedInstrumentsFactory"); 109OutLn($"private static global::System.Collections.Concurrent.ConcurrentDictionary<{meterParam.Type}, {nsprefix}{metricMethod.MetricTypeName}>"); 110OutLn($" {GetMetricDictionaryName(metricMethod)} = new();"); 145OutLn($"{accessModifier} static {nsprefix}{metricMethod.MetricTypeName} Create{metricMethod.MetricTypeName}({meterParam.Type} {meterParam.Name})"); 147OutLn($"return {GetMetricDictionaryName(metricMethod)}.GetOrAdd({meterParam.Name}, static _meter =>"); 148OutLn(" {"); 149OutLn($" var instrument = _meter.{createMethodName}(@\"{metricMethod.MetricName}\");"); 150OutLn($" return new {nsprefix}{metricMethod.MetricTypeName}(instrument);"); 151OutLn(" });");
src\Generators\Shared\EmitterBase.cs (3)
39OutLn("{"); 46OutLn("}"); 103protected void OutGeneratedCodeAttribute() => OutLn($"[{GeneratorUtilities.GeneratedCodeAttribute}]");