Mono.CSharp.Indexer.GetSignatureForError C# (CSharp) Method

GetSignatureForError() public method

public GetSignatureForError ( ) : string
return string
        public override string GetSignatureForError()
        {
            StringBuilder sb = new StringBuilder (Parent.GetSignatureForError ());
            if (MemberName.Left != null) {
                sb.Append ('.');
                sb.Append (MemberName.Left.GetSignatureForError ());
            }

            sb.Append (".this");
            sb.Append (parameters.GetSignatureForError ().Replace ('(', '[').Replace (')', ']'));
            return sb.ToString ();
        }

Usage Example

Example #1
0
void case_201()
#line 1801 "cs-parser.jay"
{
		valid_param_mod = 0;
		var type = (FullNamedExpression) yyVals[-5+yyTop];
		Indexer indexer = new Indexer (current_type, type, (MemberName) yyVals[-4+yyTop], (Modifiers) yyVals[-6+yyTop], (ParametersCompiled) yyVals[-1+yyTop], (Attributes) yyVals[-7+yyTop]);
			
		current_property = indexer;

  		current_type.AddIndexer (indexer);
		lbag.AddMember (current_property, GetModifierLocations (), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop]));
  		
		if (type.Type != null && type.Type.Kind == MemberKind.Void)
			report.Error (620, GetLocation (yyVals[-5+yyTop]), "`{0}': indexer return type cannot be `void'", indexer.GetSignatureForError ());  		

		if (indexer.ParameterInfo.IsEmpty) {
			report.Error (1551, GetLocation (yyVals[-3+yyTop]), "Indexers must have at least one parameter");
		}

		if (doc_support) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}

		lexer.PropertyParsing = true;
	  }
All Usage Examples Of Mono.CSharp.Indexer::GetSignatureForError