Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // //----------------------------------------------------------------------------- /* * 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
- SqlUserDefinedAggregateAttribute.cs
- InputElement.cs
- ToolStripSplitButton.cs
- XsltInput.cs
- RectAnimationUsingKeyFrames.cs
- IPEndPoint.cs
- Identity.cs
- ColorDialog.cs
- EntityClassGenerator.cs
- PropertyTabAttribute.cs
- SQLDoubleStorage.cs
- BitmapEffectCollection.cs
- Transform3DGroup.cs
- InputEventArgs.cs
- ContainsRowNumberChecker.cs
- EntityDataSourceStatementEditorForm.cs
- SecurityContext.cs
- SqlUtils.cs
- TextDecoration.cs
- CodeTypeParameterCollection.cs
- ClassGenerator.cs
- Membership.cs
- XmlUrlResolver.cs
- PeerHopCountAttribute.cs
- SmtpCommands.cs
- DataGridViewMethods.cs
- RC2.cs
- TemplatePagerField.cs
- IntAverageAggregationOperator.cs
- AttachInfo.cs
- GridViewRowCollection.cs
- CategoryList.cs
- TreeView.cs
- SettingsPropertyCollection.cs
- FileEnumerator.cs
- DataGridViewColumnHeaderCell.cs
- KeyValueInternalCollection.cs
- ConfigurationManagerHelper.cs
- SourceFilter.cs
- UInt32.cs
- TemplateBuilder.cs
- DataGridViewSortCompareEventArgs.cs
- XmlSchemaAnnotation.cs
- OdbcConnectionString.cs
- XsltException.cs
- UriSectionData.cs
- PhysicalOps.cs
- WebErrorHandler.cs
- RectAnimationClockResource.cs
- transactioncontext.cs
- MediaPlayer.cs
- EncryptedReference.cs
- WebException.cs
- SqlDataSourceCache.cs
- TableFieldsEditor.cs
- XmlILCommand.cs
- ProgressBarAutomationPeer.cs
- AddingNewEventArgs.cs
- ServiceModelSectionGroup.cs
- MemberHolder.cs
- ServiceMetadataExtension.cs
- AsyncResult.cs
- AsyncContentLoadedEventArgs.cs
- Image.cs
- ConditionalWeakTable.cs
- ListParaClient.cs
- WebResponse.cs
- ColumnResizeAdorner.cs
- Int64AnimationUsingKeyFrames.cs
- Parser.cs
- StringResourceManager.cs
- AssemblyCacheEntry.cs
- PassportAuthenticationEventArgs.cs
- RequestTimeoutManager.cs
- BuilderPropertyEntry.cs
- CacheChildrenQuery.cs
- XmlIgnoreAttribute.cs
- PasswordPropertyTextAttribute.cs
- TextMarkerSource.cs
- ProcessThreadCollection.cs
- ConnectionManagementElement.cs
- FixedFlowMap.cs
- DocumentApplication.cs
- CollectionMarkupSerializer.cs
- EllipseGeometry.cs
- SQLDateTime.cs
- HashCodeCombiner.cs
- Visitors.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- IItemContainerGenerator.cs
- ResourceManager.cs
- xamlnodes.cs
- ParameterReplacerVisitor.cs
- Converter.cs
- PartitionResolver.cs
- xamlnodes.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- RegistrySecurity.cs
- Assembly.cs
- DynamicResourceExtension.cs