Abp.WebApi.Controllers.Dynamic.Selectors.HttpVerbExtensions.IsEqualTo C# (CSharp) Method

IsEqualTo() public static method

Compares a HttpVerb with a HttpMethod.
public static IsEqualTo ( this verb, HttpMethod method ) : bool
verb this The Http verb
method HttpMethod The Http method
return bool
        public static bool IsEqualTo(this HttpVerb verb, HttpMethod method)
        {
            if (verb == HttpVerb.Get && method == HttpMethod.Get)
            {
                return true;
            }

            if (verb == HttpVerb.Post && method == HttpMethod.Post)
            {
                return true;
            }

            if (verb == HttpVerb.Put && method == HttpMethod.Put)
            {
                return true;
            }

            if (verb == HttpVerb.Delete && method == HttpMethod.Delete)
            {
                return true;
            }

            return false;
        }
    }
HttpVerbExtensions