SobekCM.Core.Configuration.Engine.Engine_Path_Endpoint.VerbMappingExists C# (CSharp) Method

VerbMappingExists() public method

Returns flag if a C# method is mapped to the provided HTTP verb/method
public VerbMappingExists ( string Method ) : bool
Method string Method, as upper-case string (i.e., 'DELETE', 'GET', 'POST', 'PUT', etc..)
return bool
        public bool VerbMappingExists(string Method)
        {
            switch (Method)
            {
                case "DELETE":
                case "delete":
                    return ((DeleteMapping != null) && (DeleteMapping.Enabled));

                case "GET":
                case "get":
                    return ((GetMapping != null) && (GetMapping.Enabled));

                case "POST":
                case "post":
                    return ((PostMapping != null) && (PostMapping.Enabled));

                case "PUT":
                case "put":
                    return ((PutMapping != null) && (PutMapping.Enabled));

                default:
                    return false;
            }
        }