Exemple #1
0
        void CallMethod(HttpHandler h)
        {
            switch (h.Method)
            {
            case HttpMethod.Get:
                h.Get();
                break;

            case HttpMethod.Delete:
                h.Delete();
                break;

            case HttpMethod.Post:
                h.Post();
                break;

            case HttpMethod.Put:
                h.Put();
                break;

            default:
                throw new ApplicationException("Cannot call appropriate method handler");
            }
        }