Wombat.MamaMsg.tryVectorBool C# (CSharp) Method

tryVectorBool() public method

Try to get a vector of booleans.
public tryVectorBool ( string name, ushort fid, bool &result ) : bool
name string
fid ushort
result bool
return bool
        public bool tryVectorBool(
			string name, 
			ushort fid,
			ref bool[] result)
        {
            EnsurePeerCreated();
            IntPtr array = IntPtr.Zero;
            uint size = 0;
            int code = NativeMethods.mamaMsg_getVectorBool(nativeHandle, name, fid,ref array, ref size);
            if (CheckResultCodeIgnoreNotFound(code) != MamaStatus.mamaStatus.MAMA_STATUS_OK)
            {
                return false;
            }

            byte[] bVal = new byte[size];
            bool[] val = new bool[size];
            Marshal.Copy(array, bVal, 0, (int)size);

            for (int i = 0; i <  val.Length; i++)
            {
                val[i] = (bVal[i] != 0);
            }

            result = val;
            return true;
        }

Same methods

MamaMsg::tryVectorBool ( Wombat.MamaFieldDescriptor descriptor, bool &result ) : bool
MamaMsg