Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SimpleLine.cs
- XmlEncoding.cs
- ErrorWrapper.cs
- ProvidersHelper.cs
- DataGridViewCheckBoxColumn.cs
- Html32TextWriter.cs
- Padding.cs
- PathSegment.cs
- SettingsContext.cs
- DeclarativeCatalogPartDesigner.cs
- UpdatePanelTrigger.cs
- FixedSOMLineRanges.cs
- TreeViewItemAutomationPeer.cs
- TableLayoutStyleCollection.cs
- BreakRecordTable.cs
- CommandBinding.cs
- DateTimeUtil.cs
- coordinatorfactory.cs
- ThrowHelper.cs
- Internal.cs
- TableCellCollection.cs
- TableColumn.cs
- Int32Storage.cs
- glyphs.cs
- BamlReader.cs
- ValueTypeFixupInfo.cs
- MouseButtonEventArgs.cs
- BreakRecordTable.cs
- CrossSiteScriptingValidation.cs
- SettingsPropertyValueCollection.cs
- LazyTextWriterCreator.cs
- ClientUrlResolverWrapper.cs
- ExpressionCopier.cs
- UserPreferenceChangingEventArgs.cs
- StringFreezingAttribute.cs
- ReadContentAsBinaryHelper.cs
- listitem.cs
- OleDbConnection.cs
- CFGGrammar.cs
- PersonalizationState.cs
- StickyNoteContentControl.cs
- WindowsSlider.cs
- SafeHandles.cs
- HashStream.cs
- DriveInfo.cs
- SamlAttribute.cs
- NameTable.cs
- TextParagraph.cs
- ObjectDataSourceView.cs
- ValidatorCompatibilityHelper.cs
- UIHelper.cs
- CFGGrammar.cs
- ListViewItemMouseHoverEvent.cs
- WebScriptEnablingBehavior.cs
- CryptoStream.cs
- DetailsViewCommandEventArgs.cs
- SqlDataRecord.cs
- SubstitutionList.cs
- XmlSchemaFacet.cs
- CompatibleIComparer.cs
- AttributeUsageAttribute.cs
- MarshalDirectiveException.cs
- QueryRewriter.cs
- TableLayoutStyle.cs
- StylusPointPropertyUnit.cs
- WebEncodingValidator.cs
- EntityDataSourceColumn.cs
- DbMetaDataCollectionNames.cs
- LayoutInformation.cs
- ParameterBinding.cs
- XPathMultyIterator.cs
- WinFormsSpinner.cs
- LoginUtil.cs
- PipelineComponent.cs
- BaseValidator.cs
- CharEntityEncoderFallback.cs
- EventLogPermission.cs
- HostedHttpContext.cs
- NativeMethods.cs
- SplitterPanel.cs
- MdbDataFileEditor.cs
- VideoDrawing.cs
- SocketInformation.cs
- Point3DAnimationUsingKeyFrames.cs
- TemplateBuilder.cs
- ConnectivityStatus.cs
- GridViewDeletedEventArgs.cs
- MiniModule.cs
- ByteStorage.cs
- QilInvokeEarlyBound.cs
- QuaternionValueSerializer.cs
- ProxyManager.cs
- PageClientProxyGenerator.cs
- SystemTcpConnection.cs
- ImageMap.cs
- CqlQuery.cs
- RegexCompiler.cs
- TransformConverter.cs
- XmlQueryTypeFactory.cs
- GregorianCalendarHelper.cs