IHttpHandler GetTypeHandler(HttpContext context, WebServiceHandler handler)
        {
            MethodStubInfo method = handler.GetRequestMethod(context);

            if (method == null)
            {
                return(null);
            }

            int cache_duration = method.MethodInfo.CacheDuration;

            if (cache_duration > 0)
            {
                context.Response.ExpiresAbsolute = DateTime.Now.AddSeconds(cache_duration);
            }
            if (method.MethodInfo.EnableSession)
            {
                return(new SessionWrapperHandler(handler));
            }
            else
            {
                return(handler);
            }
        }
Esempio n. 2
0
		IHttpHandler GetTypeHandler (HttpContext context, WebServiceHandler handler)
		{
			MethodStubInfo method = handler.GetRequestMethod (context);
			if (method == null) return null;

			int cache_duration = method.MethodInfo.CacheDuration;
			if (cache_duration > 0)
				context.Response.ExpiresAbsolute = DateTime.Now.AddSeconds (cache_duration);
			if (method.MethodInfo.EnableSession)
				return new SessionWrapperHandler (handler);
			else
				return handler;
		}
		IHttpHandler GetTypeHandler (HttpContext context, WebServiceHandler handler)
		{
			MethodStubInfo method = handler.GetRequestMethod (context);
			if (method == null) return null;
			
			if (method.MethodInfo.EnableSession)
				return new SessionWrapperHandler (handler);
			else
				return handler;
		}