BlueCollar.Dashboard.HandlerHelper.RouteIntValue C# (CSharp) Method

RouteIntValue() public method

Gets an integer value from the route parameters.
public RouteIntValue ( int index ) : long?
index int The index of the parameter to get the value from.
return long?
        public long? RouteIntValue(int index)
        {
            long? result = null;

            if (this.Handler.RouteParameters != null && this.Handler.RouteParameters.Count > index)
            {
                try
                {
                    result = Convert.ToInt64(this.Handler.RouteParameters[index], CultureInfo.InvariantCulture);
                }
                catch (FormatException)
                {
                }
                catch (OverflowException)
                {
                }
            }

            return result;
        }