public long GetLong()

in src/nms-api/Util/PrimitiveMapInterceptor.cs [312:335]


        public long GetLong(string key)
        {
            Object value = GetObjectProperty(key);

            try
            {
                if (value is Int64)
                {
                    return (long) value;
                }
                else if (value is Int32 || value is Int16 || value is Byte || value is String)
                {
                    return Convert.ToInt64(value);
                }
                else
                {
                    throw new MessageFormatException(" cannot read a long from " + value.GetType().Name);
                }
            }
            catch (FormatException ex)
            {
                throw NMSExceptionSupport.CreateMessageFormatException(ex);
            }
        }