本文整理汇总了C#中Property.GetSignatureForError方法的典型用法代码示例。如果您正苦于以下问题:C# Property.GetSignatureForError方法的具体用法?C# Property.GetSignatureForError怎么用?C# Property.GetSignatureForError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Property
的用法示例。
在下文中一共展示了Property.GetSignatureForError方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: case_212
void case_212()
#line 1890 "cs-parser.jay"
{
var type = (FullNamedExpression) yyVals[-3+yyTop];
var property = new Property (current_type, type, (Modifiers) yyVals[-4+yyTop],
(MemberName) yyVals[-2+yyTop], (Attributes) yyVals[-5+yyTop]);
property.Get = new Property.GetMethod (property, Modifiers.COMPILER_GENERATED, null, property.Location);
property.Get.Block = (ToplevelBlock) yyVals[0+yyTop];
if (current_container.Kind == MemberKind.Interface) {
report.Error (531, property.Get.Block.StartLocation,
"`{0}': interface members cannot have a definition", property.GetSignatureForError ());
}
if (type.Type != null && type.Type.Kind == MemberKind.Void)
report.Error (547, GetLocation (yyVals[-3+yyTop]), "`{0}': property or indexer cannot have void type", property.GetSignatureForError ());
current_type.AddMember (property);
current_local_parameters = null;
}
示例2: yyparse
//.........这里部分代码省略.........
#line 949 "cs-parser.jay"
{
--lexer.parsing_declaration;
if (RootContext.Documentation != null)
Lexer.doc_state = XmlCommentState.Allowed;
}
break;
case 109:
#line 955 "cs-parser.jay"
{
yyVal = pop_current_class ();
}
break;
case 110:
#line 958 "cs-parser.jay"
{
CheckIdentifierToken (yyToken, GetLocation (yyVals[0+yyTop]));
}
break;
case 111:
#line 965 "cs-parser.jay"
{
if (RootContext.Documentation != null)
Lexer.doc_state = XmlCommentState.Allowed;
}
break;
case 127:
#line 1007 "cs-parser.jay"
{
var modflags = (Modifiers) yyVals[-4+yyTop];
foreach (VariableDeclaration constant in (List<object>) yyVals[-1+yyTop]){
Location l = constant.Location;
if ((modflags & Modifiers.STATIC) != 0) {
Report.Error (504, l, "The constant `{0}' cannot be marked static", current_container.GetSignatureForError () + "." + (string) constant.identifier);
continue;
}
Const c = new Const (
current_class, (FullNamedExpression) yyVals[-2+yyTop], (string) constant.identifier,
constant.GetInitializer ((FullNamedExpression) yyVals[-2+yyTop]), modflags,
(Attributes) yyVals[-5+yyTop], l);
if (RootContext.Documentation != null) {
c.DocComment = Lexer.consume_doc_comment ();
Lexer.doc_state = XmlCommentState.Allowed;
}
current_container.AddConstant (c);
}
}
break;
case 128:
#line 1032 "cs-parser.jay"
{
variables_bucket.Clear ();
if (yyVals[0+yyTop] != null)
variables_bucket.Add (yyVals[0+yyTop]);
yyVal = variables_bucket;
}
break;
case 129:
#line 1039 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null) {
var constants = (List<object>) yyVals[-2+yyTop];
constants.Add (yyVals[0+yyTop]);
}