/// <summary>
        /// Converts the <see cref="StringValues"/> value to array of string.
        /// </summary>
        /// <param name="value"><see cref="StringValues"/> value.</param>
        /// <param name="delimiter">Delimiter to split values.</param>
        /// <returns>Returns the array of string.</returns>
        public static string[] ToArray(this StringValues value, string delimiter = ",")
        {
            if (value.IsNullOrDefault())
            {
                return(new string[0]);
            }

            var values = value.ToString();

            if (values.IsNullOrWhiteSpace())
            {
                return(new string[0]);
            }

            return(values.Split(new[] { delimiter }, StringSplitOptions.RemoveEmptyEntries));
        }