public AddToContext ( |
||
context | Context of |
|
mask | TypeRefMask | Type mask representing types in |
Résultat | TypeRefMask |
public TypeRefMask AddToContext(TypeRefContext/*!*/context, TypeRefMask mask)
{
Contract.ThrowIfNull(context);
if (mask.IsAnyType || mask.IsVoid || object.ReferenceEquals(this, context))
return mask;
var result = default(TypeRefMask);
var types = context.Types;
var count = Math.Min(types.Count, TypeRefMask.IndicesCount);
for (int i = 0; i < count; i++)
{
if (mask.HasType(i))
{
var index = AddToContext(types[i].Transfer(context, this));
result.AddType(index);
}
}
//
result.IsRef = mask.IsRef;
result.IncludesSubclasses = mask.IncludesSubclasses;
//
return result;
}
TypeRefContext::AddToContext ( ITypeRef typeRef ) : int | |
TypeRefContext::AddToContext ( |
/// <summary> /// Gets type mask at target type context representing given type names from given routine. /// </summary> public static TypeRefMask GetTypeMask(TypeRefContext /*!*/ targetCtx, TypeRefContext /*!*/ ctx, string[] tnames, bool fullyQualified = false) { Contract.ThrowIfNull(targetCtx); Contract.ThrowIfNull(ctx); var mask = GetTypeMask(ctx, tnames, fullyQualified); return(targetCtx.AddToContext(ctx, mask)); }