Wombat.MamaMsg.tryVectorI8 C# (CSharp) Method

tryVectorI8() public method

Try to get a vector of signed 8 bit integers.
public tryVectorI8 ( string name, ushort fid, sbyte &result ) : bool
name string
fid ushort
result sbyte
return bool
        public bool tryVectorI8(
			string name, 
			ushort fid,
			ref sbyte[] result)
        {
            EnsurePeerCreated();
            IntPtr array = IntPtr.Zero;
            uint size = 0;
            int code = NativeMethods.mamaMsg_getVectorI8(nativeHandle, name, fid,ref array, ref size);
            if (CheckResultCodeIgnoreNotFound(code) != MamaStatus.mamaStatus.MAMA_STATUS_OK)
            {
                return false;
            }
            byte[] bVal = new byte[size];
            sbyte[] val = new sbyte[size];
            Marshal.Copy(array, bVal, 0, (int)size);

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

            result = val;
            return true;
        }

Same methods

MamaMsg::tryVectorI8 ( MamaFieldDescriptor descriptor, sbyte &result ) : bool
MamaMsg