コード例 #1
0
        private static IHttpHandler CreateHandler(WebServiceData webServiceData, string methodName)
        {
            RestHandler          handler;
            WebServiceMethodData methodData = webServiceData.GetMethodData(methodName);

            if (methodData.RequiresSession)
            {
                handler = new RestHandlerWithSession();
            }
            else
            {
                handler = new RestHandler();
            }
            handler._webServiceMethodData = methodData;
            return(handler);
        }
コード例 #2
0
        private static IHttpHandler CreateHandler(WebServiceData webServiceData, string methodName) {

            // Get the data about the method being called
            WebServiceMethodData methodData = webServiceData.GetMethodData(methodName);

            // Create the proper handler, depending on whether we need session state
            RestHandler handler;
            if (methodData.RequiresSession)
                handler = new RestHandlerWithSession();
            else
                handler = new RestHandler();

            // Save the method data in the handler
            handler._webServiceMethodData = methodData;
            return handler;
        }
コード例 #3
0
ファイル: RestHandler.cs プロジェクト: wenzai007/dotnet462
        private static IHttpHandler CreateHandler(WebServiceData webServiceData, string methodName)
        {
            // Get the data about the method being called
            WebServiceMethodData methodData = webServiceData.GetMethodData(methodName);

            // Create the proper handler, depending on whether we need session state
            RestHandler handler;

            if (methodData.RequiresSession)
            {
                handler = new RestHandlerWithSession();
            }
            else
            {
                handler = new RestHandler();
            }

            // Save the method data in the handler
            handler._webServiceMethodData = methodData;
            return(handler);
        }