本文整理汇总了C#中Mono.CSharp.TypeContainer.AddDelegate方法的典型用法代码示例。如果您正苦于以下问题:C# TypeContainer.AddDelegate方法的具体用法?C# TypeContainer.AddDelegate怎么用?C# TypeContainer.AddDelegate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.CSharp.TypeContainer
的用法示例。
在下文中一共展示了TypeContainer.AddDelegate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: yyparse
//.........这里部分代码省略.........
{
--lexer.parsing_block;
VariableDeclaration vd = new VariableDeclaration (
(Tokenizer.LocatedToken) yyVals[-3+yyTop], (Expression) yyVals[0+yyTop], (Attributes) yyVals[-4+yyTop]);
if (RootContext.Documentation != null)
vd.DocComment = ConsumeStoredComment ();
yyVal = vd;
}
break;
case 329:
#line 2612 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue;
}
break;
case 330:
#line 2616 "cs-parser.jay"
{
valid_param_mod = 0;
MemberName name = MakeName ((MemberName) yyVals[-4+yyTop]);
ParametersCompiled p = (ParametersCompiled) yyVals[-1+yyTop];
Delegate del = new Delegate (current_namespace, current_class, (FullNamedExpression) yyVals[-5+yyTop],
(Modifiers) yyVals[-7+yyTop], name, p, (Attributes) yyVals[-8+yyTop]);
if (RootContext.Documentation != null) {
del.DocComment = Lexer.consume_doc_comment ();
Lexer.doc_state = XmlCommentState.Allowed;
}
current_container.AddDelegate (del);
current_delegate = del;
lexer.ConstraintsParsing = true;
}
break;
case 331:
#line 2635 "cs-parser.jay"
{
lexer.ConstraintsParsing = false;
}
break;
case 332:
#line 2639 "cs-parser.jay"
{
current_delegate.SetParameterInfo ((List<Constraints>) yyVals[-2+yyTop]);
yyVal = current_delegate;
current_delegate = null;
}
break;
case 333:
#line 2649 "cs-parser.jay"
{
yyVal = null;
}
break;
case 334:
#line 2653 "cs-parser.jay"
{
if (RootContext.MetadataCompatibilityVersion < MetadataVersion.v2)
Report.FeatureIsNotSupported (GetLocation (yyVals[0+yyTop]), "nullable types");
else if (RootContext.Version < LanguageVersion.ISO_2)
Report.FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types");