コード例 #1
0
        public static TextWriter GetChunkedWriter(this IResponse response)
        {
            if (response.OriginalResponse is HttpResponse)
            {
                return(((HttpResponse)response.OriginalResponse).GetChunkedWriter());
            }
            if (response.OriginalResponse is HttpResponseBase)
            {
                return(((HttpResponseBase)response.OriginalResponse).GetChunkedWriter());
            }
            if (response.OriginalResponse is HttpListenerResponse)
            {
                return(((HttpListenerResponse)response.OriginalResponse).GetChunkedWriter());
            }

            throw new InvalidOperationException("Unknown response type.");
        }
コード例 #2
0
 public override void OnFailedAuthentication(IAuthSession session, IHttpRequest httpReq, ServiceStack.ServiceHost.IHttpResponse httpRes)