Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / Configuration / HandlerFactoryWrapper.cs / 2 / 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
- SmtpNtlmAuthenticationModule.cs
- XamlPoint3DCollectionSerializer.cs
- TextEffect.cs
- UnauthorizedWebPart.cs
- FileCodeGroup.cs
- ConsoleKeyInfo.cs
- SrgsGrammarCompiler.cs
- TimeSpanConverter.cs
- EncodingInfo.cs
- ActivationArguments.cs
- DataGridViewCellCollection.cs
- PersonalizationStateInfo.cs
- Literal.cs
- DeobfuscatingStream.cs
- ProfileService.cs
- PriorityItem.cs
- DataGridViewRowConverter.cs
- DbMetaDataCollectionNames.cs
- DataColumnMappingCollection.cs
- ListMarkerSourceInfo.cs
- XmlSequenceWriter.cs
- RectAnimationBase.cs
- SBCSCodePageEncoding.cs
- ZipIORawDataFileBlock.cs
- TypeInformation.cs
- TrustManagerMoreInformation.cs
- MsmqInputChannel.cs
- TopClause.cs
- DataConnectionHelper.cs
- IPPacketInformation.cs
- PopupRoot.cs
- TextEditorDragDrop.cs
- ReadContentAsBinaryHelper.cs
- UnionCqlBlock.cs
- FormatConvertedBitmap.cs
- ListenerSingletonConnectionReader.cs
- DesignParameter.cs
- DbConnectionPoolGroupProviderInfo.cs
- XMLSyntaxException.cs
- StyleHelper.cs
- SimpleType.cs
- SharedDp.cs
- Compilation.cs
- SingleConverter.cs
- MinimizableAttributeTypeConverter.cs
- ObjectSpanRewriter.cs
- TypeNameHelper.cs
- RemotingException.cs
- Point3DAnimationUsingKeyFrames.cs
- WebPartDisplayMode.cs
- KoreanCalendar.cs
- AuthorizationBehavior.cs
- RoleGroupCollectionEditor.cs
- SafeNativeMethods.cs
- IndexingContentUnit.cs
- BuildProvider.cs
- DataGridViewRowPostPaintEventArgs.cs
- GregorianCalendarHelper.cs
- ConversionHelper.cs
- ZipIOBlockManager.cs
- PageContentAsyncResult.cs
- PenContexts.cs
- ListItemCollection.cs
- XmlAtomicValue.cs
- EncodingDataItem.cs
- input.cs
- MsmqTransportElement.cs
- UnauthorizedWebPart.cs
- COM2ColorConverter.cs
- FontInfo.cs
- TriggerCollection.cs
- DataPagerFieldItem.cs
- PageSettings.cs
- NavigationCommands.cs
- FormatConvertedBitmap.cs
- DesignerActionItem.cs
- HeaderCollection.cs
- HostingEnvironment.cs
- OleDbWrapper.cs
- OleDbErrorCollection.cs
- ExternalFile.cs
- NestedContainer.cs
- ThemeableAttribute.cs
- OleDbConnectionInternal.cs
- MorphHelper.cs
- PackWebRequestFactory.cs
- NetworkAddressChange.cs
- TypeDescriptionProvider.cs
- TraceHandlerErrorFormatter.cs
- EditingCoordinator.cs
- StatusStrip.cs
- Context.cs
- ParallelTimeline.cs
- CheckBoxPopupAdapter.cs
- formatter.cs
- GridViewDeletedEventArgs.cs
- IndexedString.cs
- RecordsAffectedEventArgs.cs
- InvalidOperationException.cs
- ProcessHostFactoryHelper.cs