Skip to content

@tt /HttpContextProxy.cs
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
using System;
using System.Collections;
using System.Globalization;
using System.Security.Principal;
using System.Web;
using System.Web.Caching;
using System.Web.Profile;
using System.Web.SessionState;
public abstract class HttpContextProxy : HttpContextBase
{
private readonly HttpContextBase _innerHttpContext;
protected HttpContextProxy(HttpContextBase innerHttpContext)
{
_innerHttpContext = innerHttpContext;
}
public override void AddError(Exception errorInfo)
{
_innerHttpContext.AddError(errorInfo);
}
public override Exception[] AllErrors
{
get
{
return _innerHttpContext.AllErrors;
}
}
public override HttpApplicationStateBase Application
{
get
{
return _innerHttpContext.Application;
}
}
public override HttpApplication ApplicationInstance
{
get
{
return _innerHttpContext.ApplicationInstance;
}
set
{
_innerHttpContext.ApplicationInstance = value;
}
}
public override Cache Cache
{
get
{
return _innerHttpContext.Cache;
}
}
public override void ClearError()
{
_innerHttpContext.ClearError();
}
public override IHttpHandler CurrentHandler
{
get
{
return _innerHttpContext.CurrentHandler;
}
}
public override RequestNotification CurrentNotification
{
get
{
return _innerHttpContext.CurrentNotification;
}
}
public override Exception Error
{
get
{
return _innerHttpContext.Error;
}
}
public override object GetGlobalResourceObject(string classKey, string resourceKey)
{
return _innerHttpContext.GetGlobalResourceObject(classKey, resourceKey);
}
public override object GetGlobalResourceObject(string classKey, string resourceKey, CultureInfo culture)
{
return _innerHttpContext.GetGlobalResourceObject(classKey, resourceKey, culture);
}
public override object GetLocalResourceObject(string virtualPath, string resourceKey)
{
return _innerHttpContext.GetLocalResourceObject(virtualPath, resourceKey);
}
public override object GetLocalResourceObject(string virtualPath, string resourceKey, CultureInfo culture)
{
return _innerHttpContext.GetLocalResourceObject(virtualPath, resourceKey, culture);
}
public override object GetSection(string sectionName)
{
return _innerHttpContext.GetSection(sectionName);
}
public override object GetService(Type serviceType)
{
return _innerHttpContext.GetService(serviceType);
}
public override IHttpHandler Handler
{
get
{
return _innerHttpContext.Handler;
}
set
{
_innerHttpContext.Handler = value;
}
}
public override bool IsCustomErrorEnabled
{
get
{
return _innerHttpContext.IsCustomErrorEnabled;
}
}
public override bool IsDebuggingEnabled
{
get
{
return _innerHttpContext.IsDebuggingEnabled;
}
}
public override bool IsPostNotification
{
get
{
return _innerHttpContext.IsPostNotification;
}
}
public override IDictionary Items
{
get
{
return _innerHttpContext.Items;
}
}
public override IHttpHandler PreviousHandler
{
get
{
return _innerHttpContext.PreviousHandler;
}
}
public override ProfileBase Profile
{
get
{
return _innerHttpContext.Profile;
}
}
public override void RemapHandler(IHttpHandler handler)
{
_innerHttpContext.RemapHandler(handler);
}
public override HttpRequestBase Request
{
get
{
return _innerHttpContext.Request;
}
}
public override HttpResponseBase Response
{
get
{
return _innerHttpContext.Response;
}
}
public override void RewritePath(string filePath, string pathInfo, string queryString)
{
_innerHttpContext.RewritePath(filePath, pathInfo, queryString);
}
public override void RewritePath(string filePath, string pathInfo, string queryString, bool setClientFilePath)
{
_innerHttpContext.RewritePath(filePath, pathInfo, queryString, setClientFilePath);
}
public override void RewritePath(string path)
{
_innerHttpContext.RewritePath(path);
}
public override void RewritePath(string path, bool rebaseClientPath)
{
_innerHttpContext.RewritePath(path, rebaseClientPath);
}
public override HttpServerUtilityBase Server
{
get
{
return _innerHttpContext.Server;
}
}
public override HttpSessionStateBase Session
{
get
{
return _innerHttpContext.Session;
}
}
public override void SetSessionStateBehavior(SessionStateBehavior sessionStateBehavior)
{
_innerHttpContext.SetSessionStateBehavior(sessionStateBehavior);
}
public override bool SkipAuthorization
{
get
{
return _innerHttpContext.SkipAuthorization;
}
set
{
_innerHttpContext.SkipAuthorization = value;
}
}
public override DateTime Timestamp
{
get
{
return _innerHttpContext.Timestamp;
}
}
public override TraceContext Trace
{
get
{
return _innerHttpContext.Trace;
}
}
public override IPrincipal User
{
get
{
return _innerHttpContext.User;
}
set
{
_innerHttpContext.User = value;
}
}
}
using System;
using System.Collections.Specialized;
using System.IO;
using System.Security.Authentication.ExtendedProtection;
using System.Security.Principal;
using System.Text;
using System.Web;
using System.Web.Routing;
public abstract class HttpRequestProxy : HttpRequestBase
{
private readonly HttpRequestBase _innerHttpRequest;
public HttpRequestProxy(HttpRequestBase innerHttpRequest)
{
_innerHttpRequest = innerHttpRequest;
}
public override string[] AcceptTypes
{
get
{
return _innerHttpRequest.AcceptTypes;
}
}
public override string AnonymousID
{
get
{
return _innerHttpRequest.AnonymousID;
}
}
public override string ApplicationPath
{
get
{
return _innerHttpRequest.ApplicationPath;
}
}
public override string AppRelativeCurrentExecutionFilePath
{
get
{
return _innerHttpRequest.AppRelativeCurrentExecutionFilePath;
}
}
public override byte[] BinaryRead(int count)
{
return _innerHttpRequest.BinaryRead(count);
}
public override HttpBrowserCapabilitiesBase Browser
{
get
{
return _innerHttpRequest.Browser;
}
}
public override HttpClientCertificate ClientCertificate
{
get
{
return _innerHttpRequest.ClientCertificate;
}
}
public override Encoding ContentEncoding
{
get
{
return _innerHttpRequest.ContentEncoding;
}
set
{
_innerHttpRequest.ContentEncoding = value;
}
}
public override int ContentLength
{
get
{
return _innerHttpRequest.ContentLength;
}
}
public override string ContentType
{
get
{
return _innerHttpRequest.ContentType;
}
set
{
_innerHttpRequest.ContentType = value;
}
}
public override HttpCookieCollection Cookies
{
get
{
return _innerHttpRequest.Cookies;
}
}
public override string CurrentExecutionFilePath
{
get
{
return _innerHttpRequest.CurrentExecutionFilePath;
}
}
public override string FilePath
{
get
{
return _innerHttpRequest.FilePath;
}
}
public override HttpFileCollectionBase Files
{
get
{
return _innerHttpRequest.Files;
}
}
public override Stream Filter
{
get
{
return _innerHttpRequest.Filter;
}
set
{
_innerHttpRequest.Filter = value;
}
}
public override NameValueCollection Form
{
get
{
return _innerHttpRequest.Form;
}
}
public override NameValueCollection Headers
{
get
{
return _innerHttpRequest.Headers;
}
}
public override ChannelBinding HttpChannelBinding
{
get
{
return _innerHttpRequest.HttpChannelBinding;
}
}
public override string HttpMethod
{
get
{
return _innerHttpRequest.HttpMethod;
}
}
public override Stream InputStream
{
get
{
return _innerHttpRequest.InputStream;
}
}
public override bool IsAuthenticated
{
get
{
return _innerHttpRequest.IsAuthenticated;
}
}
public override bool IsLocal
{
get
{
return _innerHttpRequest.IsLocal;
}
}
public override bool IsSecureConnection
{
get
{
return _innerHttpRequest.IsSecureConnection;
}
}
public override WindowsIdentity LogonUserIdentity
{
get
{
return _innerHttpRequest.LogonUserIdentity;
}
}
public override int[] MapImageCoordinates(string imageFieldName)
{
return _innerHttpRequest.MapImageCoordinates(imageFieldName);
}
public override string MapPath(string virtualPath)
{
return _innerHttpRequest.MapPath(virtualPath);
}
public override string MapPath(string virtualPath, string baseVirtualDir, bool allowCrossAppMapping)
{
return _innerHttpRequest.MapPath(virtualPath, baseVirtualDir, allowCrossAppMapping);
}
public override NameValueCollection Params
{
get
{
return _innerHttpRequest.Params;
}
}
public override string Path
{
get
{
return _innerHttpRequest.Path;
}
}
public override string PathInfo
{
get
{
return _innerHttpRequest.PathInfo;
}
}
public override string PhysicalApplicationPath
{
get
{
return _innerHttpRequest.PhysicalApplicationPath;
}
}
public override string PhysicalPath
{
get
{
return _innerHttpRequest.PhysicalPath;
}
}
public override NameValueCollection QueryString
{
get
{
return _innerHttpRequest.QueryString;
}
}
public override string RawUrl
{
get
{
return _innerHttpRequest.RawUrl;
}
}
public override RequestContext RequestContext
{
get
{
return _innerHttpRequest.RequestContext;
}
}
public override string RequestType
{
get
{
return _innerHttpRequest.RequestType;
}
set
{
_innerHttpRequest.RequestType = value;
}
}
public override void SaveAs(string filename, bool includeHeaders)
{
_innerHttpRequest.SaveAs(filename, includeHeaders);
}
public override NameValueCollection ServerVariables
{
get
{
return _innerHttpRequest.ServerVariables;
}
}
public override string this[string key]
{
get
{
return _innerHttpRequest[key];
}
}
public override int TotalBytes
{
get
{
return _innerHttpRequest.TotalBytes;
}
}
public override Uri Url
{
get
{
return _innerHttpRequest.Url;
}
}
public override Uri UrlReferrer
{
get
{
return _innerHttpRequest.UrlReferrer;
}
}
public override string UserAgent
{
get
{
return _innerHttpRequest.UserAgent;
}
}
public override string UserHostAddress
{
get
{
return _innerHttpRequest.UserHostAddress;
}
}
public override string UserHostName
{
get
{
return _innerHttpRequest.UserHostName;
}
}
public override string[] UserLanguages
{
get
{
return _innerHttpRequest.UserLanguages;
}
}
public override void ValidateInput()
{
_innerHttpRequest.ValidateInput();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.