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
- DataObjectEventArgs.cs
- VirtualizingPanel.cs
- ToolStripItemDataObject.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- AbandonedMutexException.cs
- ImportContext.cs
- TextRangeEditTables.cs
- FrameworkElementFactoryMarkupObject.cs
- VirtualDirectoryMapping.cs
- CompareValidator.cs
- TextParaLineResult.cs
- SpecularMaterial.cs
- SimpleFieldTemplateUserControl.cs
- MDIControlStrip.cs
- HtmlPanelAdapter.cs
- SoapTypeAttribute.cs
- securitycriticaldataClass.cs
- AdornerLayer.cs
- SmiEventStream.cs
- ExclusiveCanonicalizationTransform.cs
- TraceXPathNavigator.cs
- UITypeEditor.cs
- DiscoveryDocumentSerializer.cs
- CodeTypeDeclarationCollection.cs
- BooleanToVisibilityConverter.cs
- CoTaskMemSafeHandle.cs
- TreeNodeBindingCollection.cs
- PenLineJoinValidation.cs
- UmAlQuraCalendar.cs
- XmlLangPropertyAttribute.cs
- Avt.cs
- GuidTagList.cs
- IdentityHolder.cs
- PropertyPathConverter.cs
- ValueTypeFixupInfo.cs
- XomlCompilerError.cs
- XmlHierarchicalDataSourceView.cs
- CollectionEditor.cs
- ProfileEventArgs.cs
- RSAPKCS1SignatureDeformatter.cs
- StreamReader.cs
- BufferAllocator.cs
- MetadataSet.cs
- hresults.cs
- HttpResponseHeader.cs
- ToolStripContainer.cs
- TypedElement.cs
- XsdValidatingReader.cs
- GeneratedView.cs
- RuleValidation.cs
- StoreConnection.cs
- ASCIIEncoding.cs
- WebPartConnectionsCancelVerb.cs
- Queue.cs
- TagPrefixCollection.cs
- BuildProviderUtils.cs
- RectangleHotSpot.cs
- WS2007HttpBindingElement.cs
- ScrollableControl.cs
- TemplateControlCodeDomTreeGenerator.cs
- ActivityStatusChangeEventArgs.cs
- SQLSingleStorage.cs
- StyleSheetRefUrlEditor.cs
- AliasGenerator.cs
- DataGridViewAdvancedBorderStyle.cs
- CommandDevice.cs
- Selection.cs
- SqlNodeTypeOperators.cs
- TextElementAutomationPeer.cs
- Math.cs
- NestPullup.cs
- SettingsProperty.cs
- ElementHostAutomationPeer.cs
- ControlPropertyNameConverter.cs
- ListViewGroupConverter.cs
- DictionarySectionHandler.cs
- Intellisense.cs
- TabItem.cs
- SelectionService.cs
- GraphicsPathIterator.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- ThrowHelper.cs
- SequenceDesignerAccessibleObject.cs
- EnumerationRangeValidationUtil.cs
- SqlOuterApplyReducer.cs
- XmlHierarchicalDataSourceView.cs
- UIElementHelper.cs
- MultipleViewPatternIdentifiers.cs
- DES.cs
- TextTrailingWordEllipsis.cs
- PerformanceCounterPermissionEntry.cs
- XmlDocumentType.cs
- MemoryPressure.cs
- InfoCardProofToken.cs
- SqlMetaData.cs
- ListViewGroupItemCollection.cs
- WindowHelperService.cs
- SelectionPatternIdentifiers.cs
- FillBehavior.cs
- SqlXml.cs