private bool tryI32Impl(
string name,
ushort fid,
ref int result,
bool throwOnError)
{
EnsurePeerCreated();
int ret = 0;
int code = NativeMethods.mamaMsg_getI32(nativeHandle, name, fid, ref ret);
if ((MamaStatus.mamaStatus)code != MamaStatus.mamaStatus.MAMA_STATUS_OK)
{
if (throwOnError)
{
CheckResultCode(code);
}
else
{
return false;
}
}
result = ret;
return true;
}