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
- ProxyManager.cs
- HandledMouseEvent.cs
- XMLUtil.cs
- HttpResponse.cs
- DataObjectSettingDataEventArgs.cs
- GridViewColumnCollectionChangedEventArgs.cs
- TrackingProfileManager.cs
- ErrorHandlingReceiver.cs
- PrePostDescendentsWalker.cs
- Authorization.cs
- SchemaTypeEmitter.cs
- MeshGeometry3D.cs
- SiteMapHierarchicalDataSourceView.cs
- ComPlusContractBehavior.cs
- EntityDataSourceDesigner.cs
- InternalDispatchObject.cs
- Metafile.cs
- CursorConverter.cs
- SizeFConverter.cs
- PartialTrustVisibleAssembliesSection.cs
- EventMappingSettings.cs
- Vector.cs
- ContainsRowNumberChecker.cs
- SizeAnimationUsingKeyFrames.cs
- NameValueSectionHandler.cs
- XdrBuilder.cs
- ParameterDataSourceExpression.cs
- VerificationException.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- MetadataCollection.cs
- DataGridViewComponentPropertyGridSite.cs
- ValidatedControlConverter.cs
- StringConverter.cs
- MemberInfoSerializationHolder.cs
- View.cs
- ZoneButton.cs
- ObjectAnimationBase.cs
- PersonalizationStateQuery.cs
- DynamicPropertyHolder.cs
- TypeGenericEnumerableViewSchema.cs
- Activity.cs
- RuleSetDialog.Designer.cs
- InOutArgumentConverter.cs
- basecomparevalidator.cs
- Command.cs
- MILUtilities.cs
- ModelUIElement3D.cs
- XmlUtil.cs
- CodeParameterDeclarationExpressionCollection.cs
- WebPartVerbsEventArgs.cs
- IItemContainerGenerator.cs
- AsymmetricSignatureDeformatter.cs
- SamlSecurityTokenAuthenticator.cs
- SafeNativeMethods.cs
- BaseTemplateParser.cs
- TeredoHelper.cs
- ClientUriBehavior.cs
- ObjectQuery.cs
- StateItem.cs
- FrameSecurityDescriptor.cs
- TabletCollection.cs
- SQLDateTime.cs
- OverlappedAsyncResult.cs
- ModelItemCollectionImpl.cs
- JavaScriptSerializer.cs
- TouchPoint.cs
- HeaderCollection.cs
- ArrowControl.xaml.cs
- BuildDependencySet.cs
- SqlBooleanMismatchVisitor.cs
- BufferedStream.cs
- CodeGotoStatement.cs
- DefinitionBase.cs
- ShutDownListener.cs
- BindingExpression.cs
- DiscardableAttribute.cs
- ColumnTypeConverter.cs
- CompilerResults.cs
- FormViewInsertEventArgs.cs
- XsltLoader.cs
- TextFormatterImp.cs
- WriteFileContext.cs
- TimeManager.cs
- XamlPoint3DCollectionSerializer.cs
- IDispatchConstantAttribute.cs
- RuntimeArgumentHandle.cs
- MediaCommands.cs
- ToolbarAUtomationPeer.cs
- XpsImage.cs
- SimpleMailWebEventProvider.cs
- ThreadAbortException.cs
- TraceSource.cs
- GeneralTransform3D.cs
- Point4D.cs
- StringCollection.cs
- BinaryNode.cs
- RowToParametersTransformer.cs
- PixelShader.cs
- DuplexChannel.cs
- BinarySerializer.cs