本文整理匯總了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");