private TypeArray GetFixedDelegateParameters(AggregateType pDelegateType)
{
Debug.Assert(pDelegateType.isDelegateType());
// We have a delegate where the input types use no unfixed parameters. Create
// a substitution context; we can substitute unfixed parameters for themselves
// since they don't actually occur in the inputs. (They may occur in the outputs,
// or there may be input parameters fixed to _unfixed_ method CType variables.
// Both of those scenarios are legal.)
CType[] ppMethodParameters = new CType[_pMethodTypeParameters.size];
for (int iParam = 0; iParam < _pMethodTypeParameters.size; iParam++)
{
TypeParameterType pParam = _pMethodTypeParameters.ItemAsTypeParameterType(iParam);
ppMethodParameters[iParam] = IsUnfixed(iParam) ? pParam : _pFixedResults[iParam];
}
SubstContext subsctx = new SubstContext(_pClassTypeArguments.ToArray(), _pClassTypeArguments.size,
ppMethodParameters, _pMethodTypeParameters.size);
AggregateType pFixedDelegateType =
GetTypeManager().SubstType(pDelegateType, subsctx).AsAggregateType();
TypeArray pFixedDelegateParams =
pFixedDelegateType.GetDelegateParameters(GetSymbolLoader());
return pFixedDelegateParams;
}