Wombat.MamaMsg.tryDateTimeImpl C# (CSharp) Method

tryDateTimeImpl() private method

private tryDateTimeImpl ( string name, ushort fid, System.DateTime &result, bool throwOnError ) : bool
name string
fid ushort
result System.DateTime
throwOnError bool
return bool
        private bool tryDateTimeImpl(
			string name,
			ushort fid,
			ref DateTime result,
			bool throwOnError)
        {
            EnsurePeerCreated();
            ulong dateTimeMsec = 0;
            int code = NativeMethods.mamaMsg_getDateTimeMSec(nativeHandle, name, fid, ref dateTimeMsec);
            if ((MamaStatus.mamaStatus)code != MamaStatus.mamaStatus.MAMA_STATUS_OK)
            {
                if (throwOnError)
                {
                    CheckResultCode(code);
                }
                else
                {
                    return false;
                }
            }

            long ret = ((long)dateTimeMsec * TimeSpan.TicksPerMillisecond) + 621355968000000000;
            result = new DateTime(ret);
            return true;
        }
MamaMsg