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
- Int32Storage.cs
- SingleObjectCollection.cs
- HMACSHA256.cs
- HttpServerUtilityWrapper.cs
- Timer.cs
- Constraint.cs
- NativeMethods.cs
- MimeParameters.cs
- WindowsToolbarItemAsMenuItem.cs
- EmptyControlCollection.cs
- XslTransform.cs
- RIPEMD160.cs
- CodeDOMUtility.cs
- MetadataPropertyCollection.cs
- SqlParameterCollection.cs
- SymmetricAlgorithm.cs
- VisualStates.cs
- Attributes.cs
- SignatureDescription.cs
- ServiceDescription.cs
- AssociationType.cs
- TreeViewImageKeyConverter.cs
- CollectionDataContract.cs
- ResourceReader.cs
- ComPlusSynchronizationContext.cs
- FaultHandlingFilter.cs
- RuntimeConfig.cs
- WebControl.cs
- Viewport3DVisual.cs
- GifBitmapEncoder.cs
- UIAgentMonitorHandle.cs
- QueryRewriter.cs
- xmlformatgeneratorstatics.cs
- DataList.cs
- SatelliteContractVersionAttribute.cs
- XmlReflectionMember.cs
- XmlSchemaComplexContent.cs
- InkCanvasSelection.cs
- EraserBehavior.cs
- DataGridSortCommandEventArgs.cs
- ListControl.cs
- ISAPIRuntime.cs
- WebPartDisplayModeCollection.cs
- UpdatePanelControlTrigger.cs
- ComponentEditorForm.cs
- SynchronizedDispatch.cs
- XmlDocumentSurrogate.cs
- TabPage.cs
- DataGridBoolColumn.cs
- ZipIOCentralDirectoryBlock.cs
- SiteMapDataSourceView.cs
- Maps.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- EffectiveValueEntry.cs
- LineProperties.cs
- XmlBindingWorker.cs
- DataBindingCollection.cs
- StyleBamlRecordReader.cs
- TreeViewDataItemAutomationPeer.cs
- SendingRequestEventArgs.cs
- DictionaryEntry.cs
- DataStorage.cs
- ListViewEditEventArgs.cs
- DateTimeFormatInfo.cs
- BuilderInfo.cs
- JsonCollectionDataContract.cs
- WebPartDescription.cs
- LocalizationParserHooks.cs
- C14NUtil.cs
- XmlIgnoreAttribute.cs
- Merger.cs
- Rect.cs
- Sql8ConformanceChecker.cs
- AppSettingsExpressionBuilder.cs
- InternalRelationshipCollection.cs
- DSASignatureDeformatter.cs
- OLEDB_Enum.cs
- AppearanceEditorPart.cs
- ConfigXmlElement.cs
- MergablePropertyAttribute.cs
- RotateTransform3D.cs
- DataGridViewCellParsingEventArgs.cs
- SqlCacheDependencyDatabaseCollection.cs
- DateTimeConstantAttribute.cs
- SingleAnimation.cs
- EdmError.cs
- MatrixTransform.cs
- DataErrorValidationRule.cs
- GlobalItem.cs
- CancellableEnumerable.cs
- ProfilePropertyNameValidator.cs
- ResXResourceWriter.cs
- DrawingGroupDrawingContext.cs
- SlipBehavior.cs
- SqlDataSourceEnumerator.cs
- ListenerElementsCollection.cs
- RemotingConfiguration.cs
- ReversePositionQuery.cs
- CultureInfoConverter.cs
- ThemeDictionaryExtension.cs