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
- FixedSOMSemanticBox.cs
- TimerElapsedEvenArgs.cs
- EmptyEnumerator.cs
- PersistenceContext.cs
- ConfigXmlText.cs
- Marshal.cs
- CachedBitmap.cs
- ProbeMatchesApril2005.cs
- ThreadExceptionDialog.cs
- ContextMenuService.cs
- XhtmlConformanceSection.cs
- NetworkInterface.cs
- QilNode.cs
- TypefaceCollection.cs
- PieceDirectory.cs
- MultiBindingExpression.cs
- TypeSystem.cs
- OutKeywords.cs
- LoginUtil.cs
- StyleXamlParser.cs
- ProxyManager.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- SystemNetHelpers.cs
- ProfilePropertySettingsCollection.cs
- TextFormatter.cs
- TypeDescriptor.cs
- SQLDouble.cs
- FileDialogCustomPlace.cs
- WebScriptServiceHostFactory.cs
- EDesignUtil.cs
- NamespaceInfo.cs
- SqlProfileProvider.cs
- ValueTable.cs
- ScaleTransform3D.cs
- ButtonFieldBase.cs
- QueryTask.cs
- AxisAngleRotation3D.cs
- ServiceNameElementCollection.cs
- HighlightComponent.cs
- EventLogTraceListener.cs
- GroupQuery.cs
- DbConnectionFactory.cs
- ListItemViewControl.cs
- DashStyle.cs
- AsynchronousChannel.cs
- TimeSpanSecondsConverter.cs
- DebugView.cs
- DbDataReader.cs
- InstanceNameConverter.cs
- CheckBox.cs
- SerializationException.cs
- BindingSource.cs
- OracleCommand.cs
- PkcsMisc.cs
- DesignerActionGlyph.cs
- RequestCachePolicy.cs
- LocatorManager.cs
- NameValuePermission.cs
- FrameworkName.cs
- CodeEventReferenceExpression.cs
- XamlClipboardData.cs
- DefaultWorkflowLoaderService.cs
- SyncOperationState.cs
- SQLGuid.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- WebPartConnectionsCancelVerb.cs
- CompilationUtil.cs
- PictureBox.cs
- PrivacyNoticeBindingElementImporter.cs
- WindowsScrollBarBits.cs
- TraceInternal.cs
- IgnoreFlushAndCloseStream.cs
- _LocalDataStore.cs
- ServerType.cs
- GC.cs
- RewritingSimplifier.cs
- EqualityComparer.cs
- DesignTimeHTMLTextWriter.cs
- rsa.cs
- CssStyleCollection.cs
- InvokeHandlers.cs
- SoapIgnoreAttribute.cs
- SimpleApplicationHost.cs
- WhereQueryOperator.cs
- AttributeCollection.cs
- _UriTypeConverter.cs
- RefreshPropertiesAttribute.cs
- ViewDesigner.cs
- SoapMessage.cs
- SimpleRecyclingCache.cs
- QueryTask.cs
- ApplicationTrust.cs
- RoleManagerSection.cs
- EventLogEntryCollection.cs
- ActivityExecutionFilter.cs
- sqlpipe.cs
- BrowserInteropHelper.cs
- FileVersionInfo.cs
- CodeLinePragma.cs
- NominalTypeEliminator.cs