protected override void AppendTooltip(IncorrectPropertyAccessorNameError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("'");
     colorizer.AppendKeyword("get");
     colorizer.AppendPlainText("' or '");
     colorizer.AppendKeyword("set");
     colorizer.AppendPlainText("' expected");
 }
 protected override void AppendTooltip(AwaitIdentifierInAsyncMethodError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("'");
     colorizer.AppendKeyword("await");
     colorizer.AppendPlainText("' cannot be used as an identifier within an ");
     colorizer.AppendKeyword("async");
     colorizer.AppendPlainText(" method or lambda expression");
 }
コード例 #3
0
 protected override void AppendTooltip(BothRefValueAndClassConstraintError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot specify both a constraint class and the '");
     colorizer.AppendKeyword("class");
     colorizer.AppendPlainText("' or '");
     colorizer.AppendKeyword("struct");
     colorizer.AppendPlainText("' constraint");
 }
コード例 #4
0
 protected override void AppendTooltip(CannotAwaitInLockStatementError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot ");
     colorizer.AppendKeyword("await");
     colorizer.AppendPlainText(" in the body of a ");
     colorizer.AppendKeyword("lock");
     colorizer.AppendPlainText(" statement");
 }
コード例 #5
0
 protected override void AppendTooltip(CannotSpecifyConstructorConstraintForValueTypeError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("The '");
     colorizer.AppendKeyword("new");
     colorizer.AppendPlainText("()' constraint cannot be used with the '");
     colorizer.AppendKeyword("struct");
     colorizer.AppendPlainText("' constraint");
 }
コード例 #6
0
 protected override void AppendTooltip(CannotAwaitInExceptionFilterExpressionError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot ");
     colorizer.AppendKeyword("await");
     colorizer.AppendPlainText(" in the filter expression of a ");
     colorizer.AppendKeyword("catch");
     colorizer.AppendPlainText(" clause");
 }
 protected override void AppendTooltip(ConvertIfStatementToSwitchStatementWarning highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Convert '");
     colorizer.AppendKeyword("if");
     colorizer.AppendPlainText("' statement to '");
     colorizer.AppendKeyword("switch");
     colorizer.AppendPlainText("' statement");
 }
コード例 #8
0
 protected override void AppendTooltip(CannotAwaitInUnsafeContextError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot ");
     colorizer.AppendKeyword("await");
     colorizer.AppendPlainText(" in an ");
     colorizer.AppendKeyword("unsafe");
     colorizer.AppendPlainText(" context");
 }
コード例 #9
0
 protected override void AppendTooltip(ClassOrStructConstraintMustBeFirstError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("The '");
     colorizer.AppendKeyword("class");
     colorizer.AppendPlainText("' or '");
     colorizer.AppendKeyword("struct");
     colorizer.AppendPlainText("' constraint must come before any other constraints");
 }
コード例 #10
0
 protected override void AppendTooltip(CannotUseThisInAnonymousMethodInStructError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Anonymous methods inside structs cannot access instance members of '");
     colorizer.AppendKeyword("this");
     colorizer.AppendPlainText("'. Consider copying '");
     colorizer.AppendKeyword("this");
     colorizer.AppendPlainText("' to a local variable outside the anonymous method and using the local instead.");
 }
 protected override void AppendTooltip(CannotUseThisInClosureInStructError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Anonymous methods, lambda expressions, local functions and query expressions inside structs cannot access instance members of '");
     colorizer.AppendKeyword("this");
     colorizer.AppendPlainText("'. Consider copying '");
     colorizer.AppendKeyword("this");
     colorizer.AppendPlainText("' to a local variable outside the anonymous method, lambda expression, local function or query expression and using the local instead.");
 }
コード例 #12
0
 protected override void AppendTooltip(AwaitExpressionNotUnderAsyncMethodError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("The '");
     colorizer.AppendKeyword("await");
     colorizer.AppendPlainText("' operator can only be used in a method or lambda marked with the '");
     colorizer.AppendKeyword("async");
     colorizer.AppendPlainText("' modifier");
 }
コード例 #13
0
		protected override void AppendTooltip(AsOperatorWithUnconstrainedTypeParameterError highlighting, CSharpColorizer colorizer) {
			colorizer.AppendPlainText("The type parameter '");
			colorizer.AppendDeclaredElement(highlighting.TypeParameter, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly);
			colorizer.AppendPlainText("' cannot be used with the '");
			colorizer.AppendKeyword("as");
			colorizer.AppendPlainText("' operator because it does not have a class type constraint nor a '");
			colorizer.AppendKeyword("class");
			colorizer.AppendPlainText("' constraint");
		}
 protected override void AppendTooltip(CannotAwaitUnderQueryExpressionError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("The '");
     colorizer.AppendKeyword("await");
     colorizer.AppendPlainText("' operator may only be used in a query expression within the first collection expression of the initial '");
     colorizer.AppendKeyword("from");
     colorizer.AppendPlainText("' clause or within the collection expression of a '");
     colorizer.AppendKeyword("join");
     colorizer.AppendPlainText("' clause");
 }
コード例 #15
0
 protected override void AppendTooltip(AccessToRefOutParameterFromAnonymousMethodError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot use '");
     colorizer.AppendKeyword("ref");
     colorizer.AppendPlainText("' or '");
     colorizer.AppendKeyword("out");
     colorizer.AppendPlainText("' parameter '");
     colorizer.AppendDeclaredElement(highlighting.Parameter, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly);
     colorizer.AppendPlainText("' inside an anonymous method body");
 }
コード例 #16
0
 protected override void AppendTooltip(IncorrectTrueOrFalseOperatorTypeError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("The return type of operator ");
     colorizer.AppendKeyword("true");
     colorizer.AppendPlainText(" or ");
     colorizer.AppendKeyword("false");
     colorizer.AppendPlainText(" must be '");
     colorizer.AppendKeyword("bool");
     colorizer.AppendPlainText("'");
 }
コード例 #17
0
 protected override void AppendTooltip(ConditionalLogicTrueFalseOperatorMissingError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("The operator '");
     colorizer.AppendDeclaredElement(highlighting.SignOperator, highlighting.Substitution, PresenterOptions.QualifiedName);
     colorizer.AppendPlainText("' requires a matching operator '");
     colorizer.AppendKeyword("true");
     colorizer.AppendPlainText("'/'");
     colorizer.AppendKeyword("false");
     colorizer.AppendPlainText("' to also be defined");
 }
コード例 #18
0
 protected override void AppendTooltip(CannotAwaitInCatchOrFinallyError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot ");
     colorizer.AppendKeyword("await");
     colorizer.AppendPlainText(" in the ");
     colorizer.AppendKeyword("catch");
     colorizer.AppendPlainText(" or ");
     colorizer.AppendKeyword("finally");
     colorizer.AppendPlainText(" clause of a ");
     colorizer.AppendKeyword("try");
     colorizer.AppendPlainText(" statement");
 }
コード例 #19
0
 protected override void AppendTooltip(AssignNullToTypeParameterWithoutClassConstraintError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot convert ");
     colorizer.AppendKeyword("null");
     colorizer.AppendPlainText(" to type parameter '");
     colorizer.AppendDeclaredElement(highlighting.TypeParameter, highlighting.TypeParameter.IdSubstitution, PresenterOptions.NameOnly, highlighting.Expression);
     colorizer.AppendPlainText("' because it could be a value type. Consider using '");
     colorizer.AppendKeyword("default");
     colorizer.AppendPlainText("(");
     colorizer.AppendDeclaredElement(highlighting.TypeParameter, highlighting.TypeParameter.IdSubstitution, PresenterOptions.NameOnly, highlighting.Expression);
     colorizer.AppendPlainText(")' instead.");
 }
 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(ConditionIsAlwaysTrueOrFalseWarning highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Expression is always ");
     if (highlighting.ExpressionConstantValue == ConstantExpressionValue.TRUE)
     {
         colorizer.AppendKeyword("true");
     }
     else if (highlighting.ExpressionConstantValue == ConstantExpressionValue.FALSE)
     {
         colorizer.AppendKeyword("false");
     }
     else
     {
         colorizer.AppendPlainText("$unknown$");
     }
 }
コード例 #22
0
 protected override void AppendTooltip(CannotImplicitlyConvertGotoCaseValueToGoverningTypeWarning highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("The '");
     colorizer.AppendKeyword("goto case");
     colorizer.AppendPlainText("' value is not implicitly convertible to type '");
     colorizer.AppendExpressionType(highlighting.GoverningType, false, PresenterOptions.FullWithoutParameterNames);
     colorizer.AppendPlainText("'");
 }
コード例 #23
0
 protected override void AppendTooltip(CannotCreateInstanceOfTypeParameterWithoutNewConstraintError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot create an instance of the type parameter '");
     colorizer.AppendDeclaredElement(highlighting.TypeParameter, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly);
     colorizer.AppendPlainText("' because it does not have the ");
     colorizer.AppendKeyword("new");
     colorizer.AppendPlainText("() constraint");
 }
 protected override void AppendTooltip(CannotImplementDynamicInterfaceError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot implement a ");
     colorizer.AppendKeyword("dynamic");
     colorizer.AppendPlainText(" interface '");
     colorizer.AppendExpressionType(highlighting.SuperType, false, PresenterOptions.FullWithoutParameterNames);
     colorizer.AppendPlainText("'");
 }
コード例 #25
0
 protected override void AppendTooltip(ConstraintCannotBeDynamicTypeError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Constraint cannot be a ");
     colorizer.AppendKeyword("dynamic");
     colorizer.AppendPlainText(" type '");
     colorizer.AppendExpressionType(highlighting.SuperType, false, PresenterOptions.FullWithoutParameterNames);
     colorizer.AppendPlainText("'");
 }
 protected override void AppendTooltip(CannotCreateInstanceOfAbstractClassError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot create an instance of the ");
     colorizer.AppendKeyword("abstract");
     colorizer.AppendPlainText(" class '");
     colorizer.AppendDeclaredElement(highlighting.TypeElement, EmptySubstitution.INSTANCE, PresenterOptions.QualifiedName, highlighting.ObjectCreationExpression);
     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");
 }
コード例 #28
0
 protected override void AppendTooltip(CatchClauseCannotFollowGeneralCatchClauseError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Catch clauses cannot follow the general ");
     colorizer.AppendKeyword("catch");
     colorizer.AppendPlainText(" clause of a ");
     colorizer.AppendPlainText("try");
     colorizer.AppendPlainText(" statement");
 }
 protected override void AppendTooltip(AsOperatorWithValueTypeError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("The ");
     colorizer.AppendKeyword("as");
     colorizer.AppendPlainText(" operator must be used with a reference or nullable type ('");
     colorizer.AppendExpressionType(highlighting.ValueType, false, PresenterOptions.FullWithoutParameterNames);
     colorizer.AppendPlainText("' is a non-nullable value type)");
 }
コード例 #30
0
 protected override void AppendTooltip(BaseObjectEqualsIsObjectEqualsWarning highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Call to '");
     colorizer.AppendKeyword("base");
     colorizer.AppendOperator(".");
     colorizer.AppendMethodName("Equals");
     colorizer.AppendPlainText("(...)' is reference equality");
 }