Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / Configuration / HandlerFactoryWrapper.cs / 2 / 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 != null && !_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 != null && !_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
- ZipIOExtraField.cs
- FileDataSourceCache.cs
- TypeUsageBuilder.cs
- ParenthesizePropertyNameAttribute.cs
- WpfWebRequestHelper.cs
- DependencyPropertyAttribute.cs
- XmlSchemaExporter.cs
- TriggerActionCollection.cs
- IconEditor.cs
- CopyNodeSetAction.cs
- Columns.cs
- ServicePointManager.cs
- TypeInitializationException.cs
- KeyedQueue.cs
- EventDescriptor.cs
- HttpModulesSection.cs
- BitmapEffectInputData.cs
- AssemblyResourceLoader.cs
- ThrowHelper.cs
- ConnectionPointGlyph.cs
- InputScopeAttribute.cs
- MarkupProperty.cs
- SoapException.cs
- SolidBrush.cs
- InitiatorSessionSymmetricTransportSecurityProtocol.cs
- EventWaitHandleSecurity.cs
- StreamGeometry.cs
- UserUseLicenseDictionaryLoader.cs
- TextBlock.cs
- MaskDescriptors.cs
- InternalConfigConfigurationFactory.cs
- HtmlAnchor.cs
- JsonEnumDataContract.cs
- Int32Storage.cs
- Schema.cs
- SafeNativeMethods.cs
- SecurityTokenRequirement.cs
- PrintDocument.cs
- Cursors.cs
- PassportAuthentication.cs
- ObjectMemberMapping.cs
- RegionData.cs
- EndOfStreamException.cs
- XmlSchemaSimpleContent.cs
- HtmlImage.cs
- WinFormsUtils.cs
- ProjectionQueryOptionExpression.cs
- FixedSOMTextRun.cs
- SqlClientWrapperSmiStreamChars.cs
- Missing.cs
- MetadataHelper.cs
- IItemContainerGenerator.cs
- MbpInfo.cs
- XPathNavigatorKeyComparer.cs
- DataGridBeginningEditEventArgs.cs
- DirectionalLight.cs
- FormViewUpdatedEventArgs.cs
- CodeExpressionCollection.cs
- InternalControlCollection.cs
- InheritablePropertyChangeInfo.cs
- PackageRelationshipSelector.cs
- _KerberosClient.cs
- EdmValidator.cs
- EditorPart.cs
- CombinedGeometry.cs
- UniqueIdentifierService.cs
- StickyNote.cs
- Drawing.cs
- HttpRequest.cs
- FieldAccessException.cs
- Misc.cs
- LogAppendAsyncResult.cs
- ResourcePart.cs
- SettingsPropertyNotFoundException.cs
- TouchPoint.cs
- NativeMethods.cs
- CompiledAction.cs
- ToolStripSettings.cs
- DbgUtil.cs
- SystemIPv6InterfaceProperties.cs
- TreeView.cs
- Compiler.cs
- LocalizationComments.cs
- TrackingMemoryStreamFactory.cs
- PeerCollaboration.cs
- DynamicRendererThreadManager.cs
- clipboard.cs
- ContainerParaClient.cs
- TypeBrowser.xaml.cs
- WebPartConnectionsCancelEventArgs.cs
- PropertyInfoSet.cs
- BindingsCollection.cs
- CellLabel.cs
- InfoCardTraceRecord.cs
- Section.cs
- TextBoxLine.cs
- CurrencyWrapper.cs
- X509CertificateValidator.cs
- PreProcessInputEventArgs.cs
- HorizontalAlignConverter.cs