public MethodResponse(Header[] h1, IMethodCallMessage mcm)
{
if (mcm == null)
throw new ArgumentNullException("mcm");
Message msg = mcm as Message;
if (null != msg)
{
MI = (MethodBase)msg.GetMethodBase();
}
else
{
MI = (MethodBase)mcm.MethodBase;
}
if (MI == null)
{
throw new RemotingException(
String.Format(
CultureInfo.CurrentCulture, Environment.GetResourceString(
"Remoting_Message_MethodMissing"),
mcm.MethodName,
mcm.TypeName));
}
_methodCache = InternalRemotingServices.GetReflectionCachedData(MI);
argCount = _methodCache.Parameters.Length;
fSoap = true;
FillHeaders(h1);
}