Wombat.MamaMsg.tryMsgImpl C# (CSharp) Method

tryMsgImpl() private method

private tryMsgImpl ( string name, ushort fid, MamaMsg &result, bool throwOnError ) : bool
name string
fid ushort
result MamaMsg
throwOnError bool
return bool
        private bool tryMsgImpl(
			string name,
			ushort fid,
			ref MamaMsg result,
			bool throwOnError)
        {
            EnsurePeerCreated();

            IntPtr myP = IntPtr.Zero;

            int code = NativeMethods.mamaMsg_getMsg(nativeHandle, name, fid, ref myP);

            if (throwOnError)
            {
                CheckResultCode(code);
            }
            else
            {
                if (CheckResultCodeIgnoreNotFound(code) != MamaStatus.mamaStatus.MAMA_STATUS_OK)
                    return false;
            }

            if (result == null)
                result = new MamaMsg();

            result.setNativeHandle(myP);

            return true;
        }
MamaMsg