本文整理汇总了C#中Mono.CSharp.Method.GetSignatureForError方法的典型用法代码示例。如果您正苦于以下问题:C# Method.GetSignatureForError方法的具体用法?C# Method.GetSignatureForError怎么用?C# Method.GetSignatureForError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.CSharp.Method
的用法示例。
在下文中一共展示了Method.GetSignatureForError方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Error_DuplicateEntryPoint
void Error_DuplicateEntryPoint (Method b)
{
Report.Error (17, b.Location,
"Program `{0}' has more than one entry point defined: `{1}'",
b.Module.Builder.ScopeName, b.GetSignatureForError ());
}
示例2: Create
public static Method Create (TypeDefinition parent, FullNamedExpression returnType, Modifiers mod,
MemberName name, ParametersCompiled parameters, Attributes attrs)
{
var m = new Method (parent, returnType, mod, name, parameters, attrs);
if ((mod & Modifiers.PARTIAL) != 0) {
const Modifiers invalid_partial_mod = Modifiers.AccessibilityMask | Modifiers.ABSTRACT | Modifiers.EXTERN |
Modifiers.NEW | Modifiers.OVERRIDE | Modifiers.SEALED | Modifiers.VIRTUAL;
if ((mod & invalid_partial_mod) != 0) {
m.Report.Error (750, m.Location,
"A partial method cannot define access modifier or any of abstract, extern, new, override, sealed, or virtual modifiers");
mod &= ~invalid_partial_mod;
}
if ((parent.ModFlags & Modifiers.PARTIAL) == 0) {
m.Report.Error (751, m.Location,
"A partial method must be declared within a partial class or partial struct");
}
}
if ((mod & Modifiers.STATIC) == 0 && parameters.HasExtensionMethodType) {
m.Report.Error (1105, m.Location, "`{0}': Extension methods must be declared static",
m.GetSignatureForError ());
}
return m;
}
示例3: case_166
void case_166()
#line 1283 "cs-parser.jay"
{
lexer.ConstraintsParsing = false;
valid_param_mod = 0;
MemberName name = (MemberName) yyVals[-6+yyTop];
current_local_parameters = (ParametersCompiled) yyVals[-3+yyTop];
GenericMethod generic = null;
if (name.TypeArguments != null) {
generic = new GenericMethod (current_namespace, current_class, name,
(FullNamedExpression) yyVals[-7+yyTop], current_local_parameters);
generic.SetParameterInfo ((List<Constraints>) yyVals[0+yyTop]);
} else if (yyVals[0+yyTop] != null) {
Report.Error (80, GetLocation (yyVals[0+yyTop]),
"Constraints are not allowed on non-generic declarations");
}
Method method = new Method (current_class, generic, (FullNamedExpression) yyVals[-7+yyTop], (Modifiers) yyVals[-8+yyTop],
name, current_local_parameters, (Attributes) yyVals[-9+yyTop]);
if (yyVals[0+yyTop] != null && ((method.ModFlags & Modifiers.OVERRIDE) != 0 || method.IsExplicitImpl)) {
Report.Error (460, method.Location,
"`{0}': Cannot specify constraints for overrides and explicit interface implementation methods",
method.GetSignatureForError ());
}
if (RootContext.Documentation != null)
method.DocComment = Lexer.consume_doc_comment ();
lbag.AddMember (method, GetModifierLocations (), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]));
yyVal = method;
}
示例4: Error_DuplicateEntryPoint
void Error_DuplicateEntryPoint (Method b)
{
Report.Error (17, b.Location,
"Program `{0}' has more than one entry point defined: `{1}'",
CodeGen.FileName, b.GetSignatureForError ());
}
示例5: 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]);
}