本文整理汇总了C#中Mono.CSharp.GenericTypeExpr.ResolveAsTypeTerminal方法的典型用法代码示例。如果您正苦于以下问题:C# GenericTypeExpr.ResolveAsTypeTerminal方法的具体用法?C# GenericTypeExpr.ResolveAsTypeTerminal怎么用?C# GenericTypeExpr.ResolveAsTypeTerminal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.CSharp.GenericTypeExpr
的用法示例。
在下文中一共展示了GenericTypeExpr.ResolveAsTypeTerminal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoResolveType
protected virtual bool DoResolveType ()
{
if (!IsGeneric)
return true;
if (PartialContainer != this)
throw new InternalErrorException ();
TypeExpr current_type = null;
if (CurrentTypeParameters != null) {
foreach (TypeParameter type_param in CurrentTypeParameters) {
if (!type_param.Resolve (this)) {
error = true;
return false;
}
}
if (partial_parts != null) {
foreach (TypeContainer part in partial_parts)
UpdateTypeParameterConstraints (part);
}
}
for (int i = 0; i < TypeParameters.Length; ++i) {
//
// FIXME: Same should be done for delegates
// TODO: Quite ugly way how to propagate constraints to
// nested types
//
if (nested_gen_params != null && i < nested_gen_params.Length) {
TypeParameters [i].SetConstraints (nested_gen_params [i]);
} else {
if (!TypeParameters [i].DefineType (this)) {
error = true;
return false;
}
}
}
// TODO: Very strange, why not simple make generic type from
// current type parameters
current_type = new GenericTypeExpr (this, Location);
current_type = current_type.ResolveAsTypeTerminal (this, false);
if (current_type == null) {
error = true;
return false;
}
currentType = current_type.Type;
return true;
}