Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / HandlerFactoryWrapper.cs / 1 / HandlerFactoryWrapper.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * Config related classes for HttpApplication */ namespace System.Web.Configuration { using System; using System.Web.Util; /* * Single instance handler factory */ internal class HandlerFactoryWrapper : IHttpHandlerFactory { private IHttpHandler _handler; private Type _handlerType; internal HandlerFactoryWrapper(IHttpHandler handler, Type handlerType) { _handler = handler; _handlerType = handlerType; } public IHttpHandler GetHandler(HttpContext context, String requestType, String url, String pathTranslated) { if (_handler == null) _handler = (IHttpHandler)HttpRuntime.CreateNonPublicInstance(_handlerType); return _handler; } public void ReleaseHandler(IHttpHandler handler) { Debug.Assert(handler == _handler); if (!_handler.IsReusable) _handler = null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * Config related classes for HttpApplication */ namespace System.Web.Configuration { using System; using System.Web.Util; /* * Single instance handler factory */ internal class HandlerFactoryWrapper : IHttpHandlerFactory { private IHttpHandler _handler; private Type _handlerType; internal HandlerFactoryWrapper(IHttpHandler handler, Type handlerType) { _handler = handler; _handlerType = handlerType; } public IHttpHandler GetHandler(HttpContext context, String requestType, String url, String pathTranslated) { if (_handler == null) _handler = (IHttpHandler)HttpRuntime.CreateNonPublicInstance(_handlerType); return _handler; } public void ReleaseHandler(IHttpHandler handler) { Debug.Assert(handler == _handler); if (!_handler.IsReusable) _handler = null; } } } // 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
- DesignerActionTextItem.cs
- Camera.cs
- DataKeyArray.cs
- HttpRequest.cs
- SafeSecurityHandles.cs
- Root.cs
- VisualTransition.cs
- PriorityRange.cs
- _OSSOCK.cs
- DriveInfo.cs
- TimeSpanValidator.cs
- PropertyTab.cs
- TreeWalker.cs
- ContainerParaClient.cs
- ExtractedStateEntry.cs
- ToolStripSplitStackLayout.cs
- DefaultHttpHandler.cs
- RefExpr.cs
- AuthenticationException.cs
- XPathDocumentBuilder.cs
- StopStoryboard.cs
- EventLogPermissionEntry.cs
- SetterBaseCollection.cs
- CompilationLock.cs
- Point3DCollectionConverter.cs
- WebServiceHost.cs
- Journal.cs
- NamespaceCollection.cs
- ScrollItemPatternIdentifiers.cs
- ClientScriptManagerWrapper.cs
- SharedStream.cs
- TypeUsage.cs
- FileAuthorizationModule.cs
- KnownBoxes.cs
- Rotation3D.cs
- EntityWrapperFactory.cs
- MeshGeometry3D.cs
- InkCanvasSelection.cs
- DataGridCommandEventArgs.cs
- OdbcEnvironment.cs
- SerializerWriterEventHandlers.cs
- PreviewPageInfo.cs
- PublishLicense.cs
- SizeF.cs
- ListMarkerLine.cs
- ToolStripContentPanelRenderEventArgs.cs
- PassportPrincipal.cs
- EarlyBoundInfo.cs
- RecognizedWordUnit.cs
- StateRuntime.cs
- MediaCommands.cs
- SrgsElementFactory.cs
- ApplicationException.cs
- DesignerDataParameter.cs
- MetadataException.cs
- TextAction.cs
- MasterPageBuildProvider.cs
- COM2TypeInfoProcessor.cs
- ApplicationSecurityManager.cs
- HMACSHA384.cs
- IdentityReference.cs
- login.cs
- DesignBindingEditor.cs
- FtpWebRequest.cs
- XComponentModel.cs
- VirtualPath.cs
- TextReader.cs
- EnumValidator.cs
- RewritingSimplifier.cs
- PropertyGridCommands.cs
- cache.cs
- TrackBarRenderer.cs
- FontResourceCache.cs
- XmlSchemaNotation.cs
- AssemblyAttributesGoHere.cs
- Rotation3DKeyFrameCollection.cs
- TransformerInfo.cs
- QilSortKey.cs
- MgmtConfigurationRecord.cs
- RawKeyboardInputReport.cs
- NavigatingCancelEventArgs.cs
- RemotingAttributes.cs
- PersistenceException.cs
- HMACSHA384.cs
- DataControlImageButton.cs
- SubMenuStyle.cs
- CFStream.cs
- DataViewSetting.cs
- SortableBindingList.cs
- Polyline.cs
- BindingWorker.cs
- MediaTimeline.cs
- HtmlHead.cs
- HwndTarget.cs
- DependencyObjectPropertyDescriptor.cs
- DateTimeSerializationSection.cs
- SqlDataSourceQueryEditorForm.cs
- XmlArrayItemAttribute.cs
- EntitySetBase.cs
- parserscommon.cs