Atomia.Web.Plugin.PublicOrder.Helpers.OrderOptions.GetOrderOption C# (CSharp) Method

GetOrderOption() public static method

Gets the order option.
public static GetOrderOption ( string value ) : OrderOptions
value string The value.
return OrderOptions
        public static OrderOptions GetOrderOption(string value)
        {
            if (string.IsNullOrEmpty(value))
            {
                return null;
            }

            OrderOptions result = null;
            switch (value.ToLowerInvariant())
            {
                case "new":
                    {
                        result = New;
                        break;
                    }

                case "own":
                    {
                        result = Own;
                        break;
                    }

                case "sub":
                    {
                        result = Sub;
                        break;
                    }

                default:
                    {
                        break;
                    }
            }

            return result;
        }