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
- PeerResolverMode.cs
- PartialTrustVisibleAssemblyCollection.cs
- ToolTipAutomationPeer.cs
- MarkupCompilePass2.cs
- DispatchChannelSink.cs
- TypeBrowserDialog.cs
- WindowsEditBox.cs
- ImageKeyConverter.cs
- TemplatePartAttribute.cs
- WinInet.cs
- relpropertyhelper.cs
- XmlBinaryReader.cs
- DesignTimeParseData.cs
- Span.cs
- PassportAuthentication.cs
- Calendar.cs
- ListItemCollection.cs
- RTLAwareMessageBox.cs
- SaveFileDialog.cs
- StorageMappingItemLoader.cs
- WCFServiceClientProxyGenerator.cs
- UnauthorizedWebPart.cs
- TemplateBindingExtension.cs
- codemethodreferenceexpression.cs
- SaveFileDialog.cs
- LoginCancelEventArgs.cs
- FileInfo.cs
- QilReplaceVisitor.cs
- ResourceExpressionBuilder.cs
- DataContext.cs
- AsyncOperationLifetimeManager.cs
- StopStoryboard.cs
- Endpoint.cs
- SessionIDManager.cs
- SendActivity.cs
- ItemList.cs
- PropertyFilter.cs
- PageContentAsyncResult.cs
- WCFModelStrings.Designer.cs
- controlskin.cs
- DebugView.cs
- FormattedText.cs
- XmlJsonWriter.cs
- EditingCoordinator.cs
- TrackingMemoryStream.cs
- TableItemPattern.cs
- RegularExpressionValidator.cs
- CancelEventArgs.cs
- Gdiplus.cs
- WindowsFormsDesignerOptionService.cs
- DbConnectionClosed.cs
- HtmlFormWrapper.cs
- Trigger.cs
- WebPartConnectionsEventArgs.cs
- ProfileElement.cs
- ISO2022Encoding.cs
- Renderer.cs
- ProcessModule.cs
- FacetChecker.cs
- Reference.cs
- GridViewColumn.cs
- AuthenticationModuleElement.cs
- CachedFontFace.cs
- X509CertificateChain.cs
- TCPListener.cs
- OverrideMode.cs
- NavigationPropertySingletonExpression.cs
- SymmetricKeyWrap.cs
- NullableDoubleMinMaxAggregationOperator.cs
- RuntimeWrappedException.cs
- XmlConvert.cs
- GcSettings.cs
- SQLDateTime.cs
- StickyNoteAnnotations.cs
- ConnectionManagementSection.cs
- TextLine.cs
- GlyphManager.cs
- AuthorizationRule.cs
- SocketPermission.cs
- WebBrowserHelper.cs
- CookieHandler.cs
- SmtpReplyReader.cs
- RequiredAttributeAttribute.cs
- XamlNamespaceHelper.cs
- CapabilitiesPattern.cs
- CapabilitiesUse.cs
- Vector3DCollectionConverter.cs
- HandleCollector.cs
- Int64AnimationBase.cs
- ExpressionConverter.cs
- DispatchChannelSink.cs
- SelectorAutomationPeer.cs
- RemotingAttributes.cs
- SafeFileMappingHandle.cs
- ConnectionManagementElementCollection.cs
- ShortcutKeysEditor.cs
- HMAC.cs
- LineVisual.cs
- CallbackValidator.cs
- FormatException.cs