Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / HandlerFactoryWrapper.cs / 1305376 / 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
- BitVector32.cs
- InternalPermissions.cs
- HtmlInputFile.cs
- DataGridViewButtonCell.cs
- UpdateProgress.cs
- SimpleModelProvider.cs
- ModelVisual3D.cs
- TimeoutException.cs
- TaskHelper.cs
- LayoutUtils.cs
- RuleSet.cs
- BuildResult.cs
- CodeExpressionStatement.cs
- EmbeddedMailObject.cs
- regiisutil.cs
- FieldNameLookup.cs
- Formatter.cs
- IpcClientChannel.cs
- SafeMarshalContext.cs
- DataGridViewAdvancedBorderStyle.cs
- XmlConverter.cs
- PassportAuthenticationEventArgs.cs
- FontUnitConverter.cs
- CodeVariableReferenceExpression.cs
- RoutedUICommand.cs
- CollectionBase.cs
- HtmlFormWrapper.cs
- CellParaClient.cs
- ReaderContextStackData.cs
- TdsParserStaticMethods.cs
- TemplateControlCodeDomTreeGenerator.cs
- DataGridRowDetailsEventArgs.cs
- UnmanagedMarshal.cs
- PropertyToken.cs
- XmlAggregates.cs
- PersonalizationDictionary.cs
- XmlSerializer.cs
- DatagridviewDisplayedBandsData.cs
- Error.cs
- GroupLabel.cs
- sqlnorm.cs
- DocumentViewerHelper.cs
- BufferModesCollection.cs
- ProgressBar.cs
- PairComparer.cs
- _ListenerAsyncResult.cs
- cache.cs
- DropDownButton.cs
- TextRunProperties.cs
- Number.cs
- NumberFormatter.cs
- CustomGrammar.cs
- ExpressionBindingCollection.cs
- Int16AnimationUsingKeyFrames.cs
- DetailsViewModeEventArgs.cs
- ValidatorUtils.cs
- XmlDictionaryReader.cs
- DbCommandTree.cs
- StylusButtonEventArgs.cs
- SessionStateItemCollection.cs
- PromptEventArgs.cs
- AssemblyAssociatedContentFileAttribute.cs
- GPPOINTF.cs
- RootBrowserWindowAutomationPeer.cs
- BooleanKeyFrameCollection.cs
- PageCodeDomTreeGenerator.cs
- ResourceDescriptionAttribute.cs
- RequestQueue.cs
- StringOutput.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- SwitchElementsCollection.cs
- FloaterBaseParaClient.cs
- StrongNameKeyPair.cs
- AsyncSerializedWorker.cs
- JavaScriptObjectDeserializer.cs
- GC.cs
- SafeRightsManagementSessionHandle.cs
- Pair.cs
- EditingMode.cs
- MD5HashHelper.cs
- DynamicScriptObject.cs
- PositiveTimeSpanValidatorAttribute.cs
- HttpProxyTransportBindingElement.cs
- NullableConverter.cs
- DynamicUpdateCommand.cs
- CustomErrorsSectionWrapper.cs
- CustomErrorsSectionWrapper.cs
- XmlMembersMapping.cs
- WinEventHandler.cs
- FixedDocumentPaginator.cs
- ContainerCodeDomSerializer.cs
- ChineseLunisolarCalendar.cs
- GuidConverter.cs
- RtfToXamlLexer.cs
- ImageSourceConverter.cs
- SyntaxCheck.cs
- Matrix3D.cs
- SafeSystemMetrics.cs
- AbandonedMutexException.cs
- InfoCardKeyedHashAlgorithm.cs