本文整理汇总了C#中Microsoft.CSharp.RuntimeBinder.Semantics.AggregateType.GetBaseClass方法的典型用法代码示例。如果您正苦于以下问题:C# AggregateType.GetBaseClass方法的具体用法?C# AggregateType.GetBaseClass怎么用?C# AggregateType.GetBaseClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.CSharp.RuntimeBinder.Semantics.AggregateType
的用法示例。
在下文中一共展示了AggregateType.GetBaseClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bases
/******************************************************************************
Lookup in a class and its bases (until *ptypeEnd is hit).
ptypeEnd [in/out] - *ptypeEnd should be either null or object. If we find
something here that would hide members of object, this sets *ptypeEnd
to null.
Returns true when searching should continue to the interfaces.
******************************************************************************/
private bool LookupInClass(AggregateType typeStart, ref AggregateType ptypeEnd)
{
Debug.Assert(!_swtFirst || _fMulti);
Debug.Assert(typeStart != null && !typeStart.isInterfaceType() && (ptypeEnd == null || typeStart != ptypeEnd));
AggregateType typeEnd = ptypeEnd;
AggregateType typeCur;
// Loop through types. Loop until we hit typeEnd (object or null).
for (typeCur = typeStart; typeCur != typeEnd && typeCur != null; typeCur = typeCur.GetBaseClass())
{
Debug.Assert(!typeCur.isInterfaceType());
bool fHideByName = false;
SearchSingleType(typeCur, out fHideByName);
_flags &= ~MemLookFlags.TypeVarsAllowed;
if (_swtFirst && !_fMulti)
{
// Everything below this type and in interfaces is hidden.
return false;
}
if (fHideByName)
{
// This hides everything below it and in object, but not in the interfaces!
ptypeEnd = null;
// Return true to indicate that it's ok to search additional types.
return true;
}
if ((_flags & MemLookFlags.Ctor) != 0)
{
// If we're looking for a constructor, don't check base classes or interfaces.
return false;
}
}
Debug.Assert(typeCur == typeEnd);
return true;
}