protected override void AppendTooltip(AttributeCannotHaveTypeParametersError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("A generic type cannot derive from '"); colorizer.AppendNamespaceName("System"); colorizer.AppendOperator("."); colorizer.AppendClassName("Attribute"); colorizer.AppendPlainText("' because it is an attribute class"); }
protected override void AppendTooltip(CatchDoesNotExtendExceptionError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Catch type should extend '"); colorizer.AppendNamespaceName("System"); colorizer.AppendOperator("."); colorizer.AppendClassName("Exception"); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(ConversionFromObjectError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("User-defined conversion from '"); colorizer.AppendNamespaceName("System"); colorizer.AppendOperator("."); colorizer.AppendClassName("Object"); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(AssignNullToNotNullAttributeWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Possible '"); colorizer.AppendKeyword("null"); colorizer.AppendPlainText("' assignment to entity marked with '"); colorizer.AppendClassName("NotNull"); colorizer.AppendPlainText("' attribute"); }
protected override void AppendTooltip(AnnotateCanBeNullParameterWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Annotate "); colorizer.AppendElementKind(highlighting.Declaration.DeclaredElement); colorizer.AppendPlainText(" '"); colorizer.AppendDeclaredElement(highlighting.AnnotationTypeElement, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly, highlighting.Declaration); colorizer.AppendPlainText("' with ["); colorizer.AppendClassName(highlighting.IsContainerAnnotation ? "ItemCanBeNull" : "CanBeNull"); colorizer.AppendPlainText("] attribute"); }
protected override void AppendTooltip(BaseObjectGetHashCodeCallInGetHashCodeWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Overriden "); colorizer.AppendMethodName("GetHashCode"); colorizer.AppendPlainText(" calls base '"); colorizer.AppendClassName("Object"); colorizer.AppendOperator("."); colorizer.AppendMethodName("GetHashCode"); colorizer.AppendPlainText("()'"); }
protected override void AppendTooltip(AsyncMethodWithoutAwaitWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("This "); colorizer.AppendKeyword("async"); colorizer.AppendPlainText(" method lacks '"); colorizer.AppendKeyword("await"); colorizer.AppendPlainText("' operators and will run synchronously. Consider using the '"); colorizer.AppendKeyword("await"); colorizer.AppendPlainText("' operator to await non-blocking API calls, or '"); colorizer.AppendKeyword("await "); colorizer.AppendClassName("Task"); colorizer.AppendOperator("."); colorizer.AppendMethodName("Run"); colorizer.AppendPlainText("(...)' to do CPU-bound work on a background thread"); }
protected override void AppendTooltip(ClassIsAbstractAndSealedError highlighting, CSharpColorizer colorizer) { ITypeElement declaredElement = highlighting.ClassDeclaration.DeclaredElement; colorizer.AppendPlainText("Class '"); if (declaredElement != null) { colorizer.AppendDeclaredElement(declaredElement, EmptySubstitution.INSTANCE, PresenterOptions.QualifiedName, highlighting.ClassDeclaration); } else { colorizer.AppendClassName(highlighting.ClassDeclaration.DeclaredName); } colorizer.AppendPlainText("' cannot be both "); colorizer.AppendKeyword("abstract"); colorizer.AppendPlainText(" and "); colorizer.AppendKeyword("sealed"); }
protected override void AppendTooltip(BitwiseOperatorOnEnumWithoutFlagsWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Bitwise operation on enum which is not marked by ["); colorizer.AppendClassName("Flags"); colorizer.AppendPlainText("] attribute"); }
protected override void AppendTooltip(CannotApplyEqualityOperatorToTypeWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Cannot apply equality operator to type marked by '"); colorizer.AppendClassName("CannotApplyEqualityOperator"); colorizer.AppendPlainText("' attribute"); }
protected override void AppendTooltip(CannotUseDefaultMemberAttributeOnTypeWithIndexerError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Cannot specify the "); colorizer.AppendClassName("DefaultMember"); colorizer.AppendPlainText(" attribute on type containing an indexer"); }
protected override void AppendTooltip(AllIndexersMustHaveSameNameError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("The '"); colorizer.AppendClassName("IndexerName"); colorizer.AppendPlainText("' attribute must be used with the same name on every indexer within a type"); }