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
- CookieHandler.cs
- ChildTable.cs
- ForceCopyBuildProvider.cs
- ContainerParagraph.cs
- RequiredFieldValidator.cs
- ContainerSelectorActiveEvent.cs
- PipeSecurity.cs
- DefaultAsyncDataDispatcher.cs
- PermissionListSet.cs
- TaiwanLunisolarCalendar.cs
- HttpServerUtilityWrapper.cs
- ISFTagAndGuidCache.cs
- BoundPropertyEntry.cs
- ServiceProviders.cs
- WindowsGraphicsWrapper.cs
- Figure.cs
- EllipseGeometry.cs
- CommunicationObjectFaultedException.cs
- CatalogZoneBase.cs
- AssemblyBuilder.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- TemplateBamlRecordReader.cs
- StorageEntityTypeMapping.cs
- ReadOnlyDataSource.cs
- PrincipalPermissionMode.cs
- CalendarTable.cs
- SQLBytesStorage.cs
- SpnegoTokenAuthenticator.cs
- PackagePart.cs
- XmlNodeList.cs
- PermissionSet.cs
- FtpRequestCacheValidator.cs
- SystemEvents.cs
- Vector3DCollectionConverter.cs
- DoubleLink.cs
- LinearGradientBrush.cs
- EmbeddedObject.cs
- HtmlMeta.cs
- DataGridViewSelectedColumnCollection.cs
- XmlValidatingReaderImpl.cs
- SafeWaitHandle.cs
- ToolStripDropDownButton.cs
- PlatformCulture.cs
- ControlAdapter.cs
- KeyProperty.cs
- InlineCollection.cs
- PassportAuthenticationEventArgs.cs
- PasswordBoxAutomationPeer.cs
- LayoutTable.cs
- VirtualizedCellInfoCollection.cs
- FieldMetadata.cs
- FormatterServicesNoSerializableCheck.cs
- Models.cs
- PopupControlService.cs
- XmlDataDocument.cs
- SplashScreenNativeMethods.cs
- UnknownWrapper.cs
- RootBuilder.cs
- FormatVersion.cs
- ValidationRule.cs
- DesignerPainter.cs
- ManualWorkflowSchedulerService.cs
- ClickablePoint.cs
- WrapperEqualityComparer.cs
- CriticalHandle.cs
- ScrollViewerAutomationPeer.cs
- DocumentGrid.cs
- HTMLTextWriter.cs
- ByteRangeDownloader.cs
- NativeRecognizer.cs
- DataGridViewTextBoxColumn.cs
- TextBoxView.cs
- TCPClient.cs
- ResXFileRef.cs
- MappingModelBuildProvider.cs
- XmlSerializerNamespaces.cs
- SiteMapHierarchicalDataSourceView.cs
- Resources.Designer.cs
- XamlFilter.cs
- ProcessHostMapPath.cs
- ValidationPropertyAttribute.cs
- QuadTree.cs
- VariantWrapper.cs
- LayoutSettings.cs
- InfoCardCryptoHelper.cs
- SerializerDescriptor.cs
- NativeMethods.cs
- SafeNativeMemoryHandle.cs
- CodeTypeDelegate.cs
- DataServiceRequest.cs
- PathNode.cs
- WeakReferenceEnumerator.cs
- SecureEnvironment.cs
- GeneralTransform.cs
- DictionaryMarkupSerializer.cs
- CreateUserWizard.cs
- WorkflowStateRollbackService.cs
- BrushConverter.cs
- SoapServerMessage.cs
- MasterPageParser.cs