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
- PropertyGroupDescription.cs
- VectorConverter.cs
- AvTraceFormat.cs
- EnumConverter.cs
- MembershipSection.cs
- RewritingValidator.cs
- SimpleMailWebEventProvider.cs
- PeerCustomResolverElement.cs
- JoinGraph.cs
- FacetValueContainer.cs
- HyperLinkColumn.cs
- UnsafeNativeMethods.cs
- XmlChildEnumerator.cs
- Matrix3DConverter.cs
- RequestChannelBinder.cs
- __ComObject.cs
- OdbcRowUpdatingEvent.cs
- PropertyMetadata.cs
- _AutoWebProxyScriptWrapper.cs
- TrustManagerPromptUI.cs
- MapPathBasedVirtualPathProvider.cs
- XPathNavigator.cs
- ZipFileInfo.cs
- XmlIlVisitor.cs
- StackBuilderSink.cs
- DataGridGeneralPage.cs
- RuntimeCompatibilityAttribute.cs
- WeakReferenceEnumerator.cs
- HtmlElementEventArgs.cs
- QuaternionValueSerializer.cs
- HtmlTableCell.cs
- Matrix.cs
- BinaryReader.cs
- HttpListenerException.cs
- OpCodes.cs
- PeerNameRegistration.cs
- TransactionalPackage.cs
- DataBindingCollectionEditor.cs
- XmlDataContract.cs
- PerformanceCounterPermissionEntryCollection.cs
- Hyperlink.cs
- SchemaAttDef.cs
- MSHTMLHost.cs
- prompt.cs
- KeyValueConfigurationElement.cs
- Focus.cs
- Brush.cs
- Vector3dCollection.cs
- SignatureConfirmations.cs
- DataGridPagerStyle.cs
- LockRecoveryTask.cs
- TypeTypeConverter.cs
- FastEncoder.cs
- ResourcePool.cs
- ActiveXContainer.cs
- CachedRequestParams.cs
- UriTemplateMatchException.cs
- Visual3D.cs
- XmlWriterDelegator.cs
- PolyLineSegment.cs
- MonitoringDescriptionAttribute.cs
- WindowsAuthenticationModule.cs
- UpDownBaseDesigner.cs
- TreeViewItemAutomationPeer.cs
- EntityDataSourceChangedEventArgs.cs
- NewExpression.cs
- EventToken.cs
- ZipIOCentralDirectoryFileHeader.cs
- DataServiceResponse.cs
- ObjectAnimationUsingKeyFrames.cs
- MetafileHeader.cs
- ListViewItemSelectionChangedEvent.cs
- ManifestResourceInfo.cs
- TransformPattern.cs
- Vector3DAnimationUsingKeyFrames.cs
- TreeNode.cs
- altserialization.cs
- GlobalProxySelection.cs
- ComponentCommands.cs
- StylusPointProperty.cs
- MessageQuerySet.cs
- KoreanLunisolarCalendar.cs
- Animatable.cs
- AssemblyCollection.cs
- CodeFieldReferenceExpression.cs
- CodeSubDirectoriesCollection.cs
- ColumnHeaderConverter.cs
- WorkflowValidationFailedException.cs
- XslVisitor.cs
- FrameworkElementFactory.cs
- SoapClientMessage.cs
- SystemIPAddressInformation.cs
- WindowShowOrOpenTracker.cs
- MethodImplAttribute.cs
- MeshGeometry3D.cs
- StreamReader.cs
- PaintEvent.cs
- DataChangedEventManager.cs
- Span.cs
- WebPartAuthorizationEventArgs.cs