Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Abstractions / HttpContextWrapper.cs / 1305376 / HttpContextWrapper.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web { using System.Collections; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Security.Principal; using System.Web.Caching; using System.Web.Profile; using System.Web.SessionState; using System.Runtime.CompilerServices; [TypeForwardedFrom("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")] public class HttpContextWrapper : HttpContextBase { private readonly HttpContext _context; public HttpContextWrapper(HttpContext httpContext) { if (httpContext == null) { throw new ArgumentNullException("httpContext"); } _context = httpContext; } public override Exception[] AllErrors { get { return _context.AllErrors; } } public override HttpApplicationStateBase Application { get { return new HttpApplicationStateWrapper(_context.Application); } } // public override HttpApplication ApplicationInstance { get { return _context.ApplicationInstance; } set { _context.ApplicationInstance = value; } } // public override Cache Cache { get { return _context.Cache; } } public override IHttpHandler CurrentHandler { get { return _context.CurrentHandler; } } public override RequestNotification CurrentNotification { get { return _context.CurrentNotification; } } public override Exception Error { get { return _context.Error; } } public override IHttpHandler Handler { get { return _context.Handler; } set { _context.Handler = value; } } public override bool IsCustomErrorEnabled { get { return _context.IsCustomErrorEnabled; } } public override bool IsDebuggingEnabled { get { return _context.IsDebuggingEnabled; } } public override bool IsPostNotification { get { return _context.IsDebuggingEnabled; } } public override IDictionary Items { get { return _context.Items; } } public override IHttpHandler PreviousHandler { get { return _context.PreviousHandler; } } // public override ProfileBase Profile { get { return _context.Profile; } } public override HttpRequestBase Request { get { return new HttpRequestWrapper(_context.Request); } } public override HttpResponseBase Response { get { return new HttpResponseWrapper(_context.Response); } } public override HttpServerUtilityBase Server { get { return new HttpServerUtilityWrapper(_context.Server); } } public override HttpSessionStateBase Session { get { HttpSessionState session = _context.Session; return (session != null) ? new HttpSessionStateWrapper(session) : null; } } public override bool SkipAuthorization { get { return _context.SkipAuthorization; } set { _context.SkipAuthorization = value; } } public override DateTime Timestamp { get { return _context.Timestamp; } } // public override TraceContext Trace { get { return _context.Trace; } } public override IPrincipal User { get { return _context.User; } set { _context.User = value; } } public override void AddError(Exception errorInfo) { _context.AddError(errorInfo); } public override void ClearError() { _context.ClearError(); } [SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", Justification = "Matches HttpContext class")] public override object GetGlobalResourceObject(string classKey, string resourceKey) { return HttpContext.GetGlobalResourceObject(classKey, resourceKey); } public override object GetGlobalResourceObject(string classKey, string resourceKey, CultureInfo culture) { return HttpContext.GetGlobalResourceObject(classKey, resourceKey, culture); } [SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", Justification = "Matches HttpContext class")] public override object GetLocalResourceObject(string virtualPath, string resourceKey) { return HttpContext.GetLocalResourceObject(virtualPath, resourceKey); } public override object GetLocalResourceObject(string virtualPath, string resourceKey, CultureInfo culture) { return HttpContext.GetLocalResourceObject(virtualPath, resourceKey, culture); } public override object GetSection(string sectionName) { return _context.GetSection(sectionName); } public override void RemapHandler(IHttpHandler handler) { _context.RemapHandler(handler); } public override void RewritePath(string path) { _context.RewritePath(path); } public override void RewritePath(string path, bool rebaseClientPath) { _context.RewritePath(path, rebaseClientPath); } public override void RewritePath(string filePath, string pathInfo, string queryString) { _context.RewritePath(filePath, pathInfo, queryString); } public override void RewritePath(string filePath, string pathInfo, string queryString, bool setClientFilePath) { _context.RewritePath(filePath, pathInfo, queryString, setClientFilePath); } public override void SetSessionStateBehavior(SessionStateBehavior sessionStateBehavior) { _context.SetSessionStateBehavior(sessionStateBehavior); } public override object GetService(Type serviceType) { return ((IServiceProvider)_context).GetService(serviceType); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web { using System.Collections; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Security.Principal; using System.Web.Caching; using System.Web.Profile; using System.Web.SessionState; using System.Runtime.CompilerServices; [TypeForwardedFrom("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")] public class HttpContextWrapper : HttpContextBase { private readonly HttpContext _context; public HttpContextWrapper(HttpContext httpContext) { if (httpContext == null) { throw new ArgumentNullException("httpContext"); } _context = httpContext; } public override Exception[] AllErrors { get { return _context.AllErrors; } } public override HttpApplicationStateBase Application { get { return new HttpApplicationStateWrapper(_context.Application); } } // public override HttpApplication ApplicationInstance { get { return _context.ApplicationInstance; } set { _context.ApplicationInstance = value; } } // public override Cache Cache { get { return _context.Cache; } } public override IHttpHandler CurrentHandler { get { return _context.CurrentHandler; } } public override RequestNotification CurrentNotification { get { return _context.CurrentNotification; } } public override Exception Error { get { return _context.Error; } } public override IHttpHandler Handler { get { return _context.Handler; } set { _context.Handler = value; } } public override bool IsCustomErrorEnabled { get { return _context.IsCustomErrorEnabled; } } public override bool IsDebuggingEnabled { get { return _context.IsDebuggingEnabled; } } public override bool IsPostNotification { get { return _context.IsDebuggingEnabled; } } public override IDictionary Items { get { return _context.Items; } } public override IHttpHandler PreviousHandler { get { return _context.PreviousHandler; } } // public override ProfileBase Profile { get { return _context.Profile; } } public override HttpRequestBase Request { get { return new HttpRequestWrapper(_context.Request); } } public override HttpResponseBase Response { get { return new HttpResponseWrapper(_context.Response); } } public override HttpServerUtilityBase Server { get { return new HttpServerUtilityWrapper(_context.Server); } } public override HttpSessionStateBase Session { get { HttpSessionState session = _context.Session; return (session != null) ? new HttpSessionStateWrapper(session) : null; } } public override bool SkipAuthorization { get { return _context.SkipAuthorization; } set { _context.SkipAuthorization = value; } } public override DateTime Timestamp { get { return _context.Timestamp; } } // public override TraceContext Trace { get { return _context.Trace; } } public override IPrincipal User { get { return _context.User; } set { _context.User = value; } } public override void AddError(Exception errorInfo) { _context.AddError(errorInfo); } public override void ClearError() { _context.ClearError(); } [SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", Justification = "Matches HttpContext class")] public override object GetGlobalResourceObject(string classKey, string resourceKey) { return HttpContext.GetGlobalResourceObject(classKey, resourceKey); } public override object GetGlobalResourceObject(string classKey, string resourceKey, CultureInfo culture) { return HttpContext.GetGlobalResourceObject(classKey, resourceKey, culture); } [SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", Justification = "Matches HttpContext class")] public override object GetLocalResourceObject(string virtualPath, string resourceKey) { return HttpContext.GetLocalResourceObject(virtualPath, resourceKey); } public override object GetLocalResourceObject(string virtualPath, string resourceKey, CultureInfo culture) { return HttpContext.GetLocalResourceObject(virtualPath, resourceKey, culture); } public override object GetSection(string sectionName) { return _context.GetSection(sectionName); } public override void RemapHandler(IHttpHandler handler) { _context.RemapHandler(handler); } public override void RewritePath(string path) { _context.RewritePath(path); } public override void RewritePath(string path, bool rebaseClientPath) { _context.RewritePath(path, rebaseClientPath); } public override void RewritePath(string filePath, string pathInfo, string queryString) { _context.RewritePath(filePath, pathInfo, queryString); } public override void RewritePath(string filePath, string pathInfo, string queryString, bool setClientFilePath) { _context.RewritePath(filePath, pathInfo, queryString, setClientFilePath); } public override void SetSessionStateBehavior(SessionStateBehavior sessionStateBehavior) { _context.SetSessionStateBehavior(sessionStateBehavior); } public override object GetService(Type serviceType) { return ((IServiceProvider)_context).GetService(serviceType); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AttributeQuery.cs
- PropertyGridCommands.cs
- XXXOnTypeBuilderInstantiation.cs
- SecurityIdentifierElement.cs
- DataGridViewLinkColumn.cs
- ConfigurationStrings.cs
- Int32Animation.cs
- InternalConfigSettingsFactory.cs
- TypeSystem.cs
- DeploymentExceptionMapper.cs
- SystemUnicastIPAddressInformation.cs
- SmiEventSink_Default.cs
- DataObject.cs
- RectValueSerializer.cs
- RequestCacheValidator.cs
- FullTrustAssemblyCollection.cs
- XD.cs
- FixedSOMTextRun.cs
- TextSimpleMarkerProperties.cs
- SharedStatics.cs
- ColorContextHelper.cs
- EventBuilder.cs
- SmiTypedGetterSetter.cs
- ListViewEditEventArgs.cs
- LinearKeyFrames.cs
- EmptyCollection.cs
- Sequence.cs
- SrgsText.cs
- TagPrefixInfo.cs
- OraclePermissionAttribute.cs
- TreeView.cs
- TextBoxAutomationPeer.cs
- FunctionImportMapping.cs
- AppSettingsSection.cs
- InvalidProgramException.cs
- HttpModuleActionCollection.cs
- UserControlParser.cs
- DiscoveryMessageSequenceCD1.cs
- MouseWheelEventArgs.cs
- Int64Storage.cs
- ToolStripRenderEventArgs.cs
- SqlDataSourceView.cs
- _SSPIWrapper.cs
- ECDiffieHellmanCngPublicKey.cs
- ExpandSegment.cs
- BindingManagerDataErrorEventArgs.cs
- ElementFactory.cs
- VScrollBar.cs
- FormattedTextSymbols.cs
- Win32.cs
- DataGridTable.cs
- RootBrowserWindowAutomationPeer.cs
- ProxyWebPartManager.cs
- PreviewPageInfo.cs
- ToggleButton.cs
- IdentifierCollection.cs
- SamlAction.cs
- _SpnDictionary.cs
- Rotation3DAnimationUsingKeyFrames.cs
- MasterPageCodeDomTreeGenerator.cs
- RangeValuePatternIdentifiers.cs
- ServiceModelSecurityTokenTypes.cs
- Listbox.cs
- Polygon.cs
- AnimationLayer.cs
- TouchesCapturedWithinProperty.cs
- Trace.cs
- Visual3D.cs
- SizeAnimationBase.cs
- precedingquery.cs
- BlurEffect.cs
- CompilerTypeWithParams.cs
- VisualProxy.cs
- Encoder.cs
- ButtonPopupAdapter.cs
- NodeFunctions.cs
- ArrangedElementCollection.cs
- XslCompiledTransform.cs
- WebReferencesBuildProvider.cs
- SimpleHandlerBuildProvider.cs
- UnsafeNativeMethodsMilCoreApi.cs
- ValueOfAction.cs
- SymbolUsageManager.cs
- FieldNameLookup.cs
- ParamArrayAttribute.cs
- ProxyWebPartConnectionCollection.cs
- EventLogPermissionEntryCollection.cs
- SessionStateSection.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- UpdateRecord.cs
- GridLength.cs
- RenderOptions.cs
- DelayedRegex.cs
- RelationshipWrapper.cs
- UserControlParser.cs
- InvalidPrinterException.cs
- LingerOption.cs
- ProjectionCamera.cs
- FragmentQueryKB.cs
- NegotiateStream.cs