Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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 != null && !_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 != null && !_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
- StyleXamlParser.cs
- WebMessageEncodingElement.cs
- TextStore.cs
- EastAsianLunisolarCalendar.cs
- ListItem.cs
- SingleResultAttribute.cs
- MenuItemBindingCollection.cs
- RichTextBoxAutomationPeer.cs
- IImplicitResourceProvider.cs
- CodeBlockBuilder.cs
- TypeDescriptionProvider.cs
- Encoding.cs
- Package.cs
- SqlExpander.cs
- PageThemeParser.cs
- AtomPub10ServiceDocumentFormatter.cs
- FormViewRow.cs
- PeerNameRecord.cs
- HebrewCalendar.cs
- MouseGestureValueSerializer.cs
- GeneralTransform3DTo2D.cs
- QuotedPrintableStream.cs
- ExecutionEngineException.cs
- DrawingContext.cs
- MsmqIntegrationInputChannel.cs
- NamedPipeProcessProtocolHandler.cs
- SingleStorage.cs
- InheritanceUI.cs
- XmlDocumentSerializer.cs
- AncillaryOps.cs
- TemplateAction.cs
- DateTimeUtil.cs
- RandomDelayQueuedSendsAsyncResult.cs
- JsonDeserializer.cs
- ConnectorMovedEventArgs.cs
- AdjustableArrowCap.cs
- LeafCellTreeNode.cs
- DatePicker.cs
- SecurityRuntime.cs
- WindowsToolbarItemAsMenuItem.cs
- SID.cs
- SqlDataReader.cs
- EditorZone.cs
- DataRowExtensions.cs
- WinCategoryAttribute.cs
- Fonts.cs
- SqlReferenceCollection.cs
- RegistrySecurity.cs
- AutomationElementCollection.cs
- NullToBooleanConverter.cs
- TypeBrowser.xaml.cs
- ListCollectionView.cs
- PlainXmlWriter.cs
- HttpListenerPrefixCollection.cs
- LongMinMaxAggregationOperator.cs
- MarshalByValueComponent.cs
- AppDomainFactory.cs
- GridViewEditEventArgs.cs
- StringPropertyBuilder.cs
- ReturnType.cs
- SpellerError.cs
- AsyncCompletedEventArgs.cs
- externdll.cs
- VirtualizingPanel.cs
- DelegatingChannelListener.cs
- TimeSpanSecondsConverter.cs
- FirstMatchCodeGroup.cs
- DynamicPropertyHolder.cs
- SettingsAttributeDictionary.cs
- Tuple.cs
- BitmapMetadata.cs
- WindowsIPAddress.cs
- WorkflowViewElement.cs
- FunctionCommandText.cs
- TCPClient.cs
- PrintDocument.cs
- RegexBoyerMoore.cs
- HitTestDrawingContextWalker.cs
- DataServiceRequest.cs
- TextEditorCharacters.cs
- Rule.cs
- LoginStatusDesigner.cs
- EventLogger.cs
- EncryptedType.cs
- BinaryMethodMessage.cs
- HttpApplicationFactory.cs
- UseLicense.cs
- TimerElapsedEvenArgs.cs
- WsdlEndpointConversionContext.cs
- System.Data.OracleClient_BID.cs
- VariableAction.cs
- IncrementalCompileAnalyzer.cs
- DatePicker.cs
- ToolStripDropDown.cs
- TreeViewCancelEvent.cs
- RenderTargetBitmap.cs
- OutputCacheProfile.cs
- HtmlInputControl.cs
- invalidudtexception.cs
- TreeView.cs