BISDK.Extensions.ApiMethod C# (CSharp) Method

ApiMethod() public static method

public static ApiMethod ( this action ) : Method
action this
return Method
        public static Method ApiMethod(this ApiAction action)
        {
            Method method;
            switch (action)
            {
                case ApiAction.INDEX:
                case ApiAction.LIST:
                    method = Method.GET;
                    break;

                case ApiAction.CREATE:
                    method = Method.POST;
                    break;

                case ApiAction.DELETE:
                    method = Method.DELETE;
                    break;

                case ApiAction.UPDATE:
                    method = Method.PUT;
                    break;

                default:
                    method = Method.GET;
                    break;
            }
            return method;
        }
Extensions