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