本文整理匯總了C#中Mono.CSharp.ExpressionStatement.ResolveStatement方法的典型用法代碼示例。如果您正苦於以下問題:C# ExpressionStatement.ResolveStatement方法的具體用法?C# ExpressionStatement.ResolveStatement怎麽用?C# ExpressionStatement.ResolveStatement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Mono.CSharp.ExpressionStatement
的用法示例。
在下文中一共展示了ExpressionStatement.ResolveStatement方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ResolveVariable
bool ResolveVariable (BlockContext ec)
{
assign = new SimpleAssign (var, init, loc);
assign = assign.ResolveStatement (ec);
if (assign == null)
return false;
if (assign.Type == TypeManager.idisposable_type || assign.Type.ImplementsInterface (TypeManager.idisposable_type)) {
return true;
}
Expression e = Convert.ImplicitConversionStandard (ec, assign, TypeManager.idisposable_type, var.Location);
if (e == null) {
if (assign.Type == InternalType.Dynamic) {
e = Convert.ImplicitConversionRequired (ec, assign, TypeManager.idisposable_type, loc);
var = new TemporaryVariable (e.Type, loc);
assign = new SimpleAssign (var, e, loc).ResolveStatement (ec);
return true;
}
Error_IsNotConvertibleToIDisposable (ec, var);
return false;
}
throw new NotImplementedException ("covariance?");
}