41 references to DiagDescriptors
Microsoft.Gen.Logging (41)
Parsing\Parser.cs (27)
136
Diag(
DiagDescriptors
.CantUseDataClassificationWithLogPropertiesOrTagProvider, paramSymbol.GetLocation());
142
Diag(
DiagDescriptors
.CantMixAttributes, paramSymbol.GetLocation());
154
Diag(
DiagDescriptors
.DefaultToString, paramSymbol.GetLocation(), paramSymbol.Type, paramSymbol.Name);
167
Diag(
DiagDescriptors
.ShouldntMentionLoggerInMessage, attrLoc, lp.ParameterName);
172
Diag(
DiagDescriptors
.ShouldntMentionExceptionInMessage, attrLoc, lp.ParameterName);
177
Diag(
DiagDescriptors
.ShouldntMentionLogLevelInMessage, attrLoc, lp.ParameterName);
182
Diag(
DiagDescriptors
.ParameterHasNoCorrespondingTemplate, paramSymbol.GetLocation(), lp.ParameterName);
194
Diag(
DiagDescriptors
.RecordTypeSensitiveArgumentIsInTemplate, paramSymbol.GetLocation(), lp.ParameterName, lm.Name);
213
Diag(
DiagDescriptors
.MissingLoggerParameter, method.ParameterList.GetLocation(), lm.Name);
218
Diag(
DiagDescriptors
.LoggingMethodShouldBeStatic, method.Identifier.GetLocation());
229
Diag(
DiagDescriptors
.MultipleLoggerMembers, secondLoggerMember.GetLocation(), typeDec.Identifier.Text);
234
Diag(
DiagDescriptors
.MissingLoggerMember, method.Identifier.GetLocation(), typeDec.Identifier.Text);
246
Diag(
DiagDescriptors
.MissingLogLevel, method.GetLocation());
258
Diag(
DiagDescriptors
.EmptyLoggingMethod, method.Identifier.GetLocation(), methodSymbol.Name);
279
Diag(
DiagDescriptors
.TemplateHasNoCorrespondingParameter, attrLoc, t);
390
Diag(
DiagDescriptors
.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString());
397
Diag(
DiagDescriptors
.LoggingMethodMustReturnVoid, method.ReturnType.GetLocation());
404
Diag(
DiagDescriptors
.LoggingMethodIsGeneric, method.TypeParameterList!.GetLocation());
411
Diag(
DiagDescriptors
.LoggingMethodHasBody, method.Body.GetLocation());
416
Diag(
DiagDescriptors
.LoggingMethodMustBePartial, method.Identifier.GetLocation());
425
Diag(
DiagDescriptors
.ShouldntReuseEventIds, attrLoc, lm.EventId.Value, methodSymbol.ContainingType.Name);
434
Diag(
DiagDescriptors
.ShouldntReuseEventNames, attrLoc, lm.EventName, methodSymbol.ContainingType.Name);
448
Diag(
DiagDescriptors
.RedundantQualifierInMessage, attrLoc, methodSymbol.Name);
501
Diag(
DiagDescriptors
.TagNameCollision, parameterSymbols[parameter].GetLocation(), parameter.ParameterName, fullName, lm.Name);
507
Diag(
DiagDescriptors
.TagNameCollision, parameterSymbols[parameter].GetLocation(), parameter.ParameterName, parameter.TagName, lm.Name);
551
Diag(
DiagDescriptors
.LoggingMethodParameterRefKind, paramSymbol.GetLocation(), paramSymbol.ContainingSymbol.Name, paramName);
723
Diag(
DiagDescriptors
.PrimaryConstructorParameterLoggerHidden, parameter.GetLocation(), classDec.Identifier.Text);
Parsing\Parser.LogProperties.cs (9)
33
Diag(
DiagDescriptors
.LogPropertiesInvalidUsage, paramSymbol.GetLocation(), paramName);
67
Diag(
DiagDescriptors
.LogPropertiesParameterSkipped, paramSymbol.GetLocation(), paramTypeSymbol.Name, paramName);
152
Diag(
DiagDescriptors
.CantMixAttributes, property.GetLocation());
244
Diag(
DiagDescriptors
.LogPropertiesHiddenPropertyDetected, paramSymbol.GetLocation(), paramName, lm.Name, property.Name);
255
Diag(
DiagDescriptors
.InvalidAttributeUsage, logPropertiesAttribute.ApplicationSyntaxReference?.GetSyntax(_cancellationToken).GetLocation(), "LogProperties");
264
Diag(
DiagDescriptors
.LogPropertiesCycleDetected, paramSymbol.GetLocation(), paramName, namedType.ToDisplayString(), property.Type.ToDisplayString(), lm.Name);
295
Diag(
DiagDescriptors
.InvalidAttributeUsage, tagProviderAttribute.ApplicationSyntaxReference?.GetSyntax(_cancellationToken).GetLocation(), "TagProvider");
321
Diag(
DiagDescriptors
.DefaultToString, property.GetLocation(), property.Type, property.Name);
351
Diag(
DiagDescriptors
.InvalidTypeToLogProperties, sym.GetLocation(), symType.ToDisplayString());
Parsing\Parser.TagProvider.cs (4)
22
Diag(
DiagDescriptors
.TagProviderInvalidUsage, paramSymbol.GetLocation(), paramName);
110
Diag(
DiagDescriptors
.TagProviderMethodInaccessible, attrLocation, providerMethodName, providerType.ToString());
117
Diag(
DiagDescriptors
.TagProviderMethodInvalidSignature, attrLocation,
125
Diag(
DiagDescriptors
.TagProviderMethodNotFound, attrLocation, providerMethodName, providerType.ToString());
Parsing\SymbolLoader.cs (1)
85
diagCallback(
DiagDescriptors
.MissingRequiredType, null, new object[] { ExceptionType });