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
- ControlAdapter.cs
- NumberSubstitution.cs
- dataobject.cs
- ContainerUtilities.cs
- XmlSchemaSimpleContent.cs
- NamespaceCollection.cs
- ColorBlend.cs
- AssertFilter.cs
- EdmComplexPropertyAttribute.cs
- TcpTransportSecurityElement.cs
- externdll.cs
- InputDevice.cs
- baseaxisquery.cs
- DataControlPagerLinkButton.cs
- DataRecordInfo.cs
- ToolboxComponentsCreatedEventArgs.cs
- PerformanceCounterLib.cs
- RequestBringIntoViewEventArgs.cs
- SecurityPolicyVersion.cs
- ProxyElement.cs
- SplineQuaternionKeyFrame.cs
- SamlAttributeStatement.cs
- GregorianCalendarHelper.cs
- Mapping.cs
- DBSchemaRow.cs
- SecurityContextSecurityTokenAuthenticator.cs
- LOSFormatter.cs
- Query.cs
- Serializer.cs
- UnsafeNativeMethods.cs
- ClientUrlResolverWrapper.cs
- StrokeDescriptor.cs
- ThaiBuddhistCalendar.cs
- TextBoxLine.cs
- WSFederationHttpSecurity.cs
- WindowsPrincipal.cs
- LinearKeyFrames.cs
- InputProcessorProfilesLoader.cs
- TemplateKey.cs
- TextTreeDeleteContentUndoUnit.cs
- InheritedPropertyDescriptor.cs
- ToolboxBitmapAttribute.cs
- DefaultValueTypeConverter.cs
- ExpressionBuilderCollection.cs
- ClientSideProviderDescription.cs
- MoveSizeWinEventHandler.cs
- SerializationException.cs
- SizeF.cs
- parserscommon.cs
- HttpListenerPrefixCollection.cs
- ExpressionBuilder.cs
- TransformerInfo.cs
- JsonReaderWriterFactory.cs
- CatalogZone.cs
- TreeViewCancelEvent.cs
- TransformerInfoCollection.cs
- ComNativeDescriptor.cs
- WinFormsSpinner.cs
- ObjectNotFoundException.cs
- AssemblyCollection.cs
- DrawingServices.cs
- RowsCopiedEventArgs.cs
- XmlDocumentSerializer.cs
- MetadataFile.cs
- StructuralObject.cs
- CompilationPass2Task.cs
- XPathBinder.cs
- EditingCommands.cs
- UserControlDocumentDesigner.cs
- PageThemeBuildProvider.cs
- CommandDesigner.cs
- CodeFieldReferenceExpression.cs
- SynchronizationContext.cs
- HtmlSelect.cs
- XmlSchemaExporter.cs
- FacetEnabledSchemaElement.cs
- SelectionUIService.cs
- TreeNodeStyleCollection.cs
- TdsParserStaticMethods.cs
- ConsoleEntryPoint.cs
- BehaviorDragDropEventArgs.cs
- PeerApplication.cs
- HttpConfigurationSystem.cs
- WebReferenceOptions.cs
- DbFunctionCommandTree.cs
- X509UI.cs
- ExtendedProperty.cs
- ConfigWriter.cs
- WebPartConnectionsEventArgs.cs
- CancelEventArgs.cs
- StringStorage.cs
- RelOps.cs
- NetworkCredential.cs
- Bits.cs
- AppliedDeviceFiltersDialog.cs
- Sql8ExpressionRewriter.cs
- DataServiceException.cs
- BuildManager.cs
- mediaeventargs.cs
- AttachedPropertyBrowsableForTypeAttribute.cs