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
- SecurityPolicySection.cs
- HtmlContainerControl.cs
- XmlSchemaObject.cs
- TraceContextRecord.cs
- ThreadStaticAttribute.cs
- XmlComment.cs
- VectorAnimationUsingKeyFrames.cs
- UserControl.cs
- HierarchicalDataTemplate.cs
- KeyValuePair.cs
- ListItemConverter.cs
- Collection.cs
- GuidelineCollection.cs
- ServiceOperationParameter.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- CommentEmitter.cs
- RuleSetReference.cs
- Condition.cs
- AspCompat.cs
- SoapSchemaExporter.cs
- ContextMenuStripGroup.cs
- UrlAuthFailedErrorFormatter.cs
- HotSpotCollection.cs
- MouseOverProperty.cs
- DeviceContext.cs
- GACMembershipCondition.cs
- Parsers.cs
- LoggedException.cs
- TraceLog.cs
- GridViewColumnHeaderAutomationPeer.cs
- SQLInt64Storage.cs
- KeyboardEventArgs.cs
- NetWebProxyFinder.cs
- BrowserCapabilitiesCodeGenerator.cs
- ValuePattern.cs
- DataListItem.cs
- CompatibleComparer.cs
- DataBoundControlAdapter.cs
- BitmapDecoder.cs
- ErrorRuntimeConfig.cs
- OleDbConnection.cs
- sqlser.cs
- FormView.cs
- ContextStack.cs
- util.cs
- IsolatedStoragePermission.cs
- GenerateHelper.cs
- SQLInt32.cs
- HGlobalSafeHandle.cs
- RadioButtonRenderer.cs
- ChangeToolStripParentVerb.cs
- SqlRowUpdatedEvent.cs
- DataGridViewAccessibleObject.cs
- DynamicRouteExpression.cs
- XmlSchemaImporter.cs
- ExpressionDumper.cs
- Pair.cs
- ImageClickEventArgs.cs
- SplashScreen.cs
- TraceContext.cs
- SubstitutionList.cs
- DataGridPagerStyle.cs
- UIPermission.cs
- DocumentViewerBase.cs
- MutexSecurity.cs
- DoubleAnimation.cs
- MessageSmuggler.cs
- Symbol.cs
- ZeroOpNode.cs
- SerializationObjectManager.cs
- TraceFilter.cs
- LayoutDump.cs
- NullableLongSumAggregationOperator.cs
- SpotLight.cs
- OrderPreservingMergeHelper.cs
- SiteMapProvider.cs
- AdRotator.cs
- CqlLexerHelpers.cs
- XmlTextEncoder.cs
- DispatcherHookEventArgs.cs
- CompositeControl.cs
- LicenseProviderAttribute.cs
- RadioButton.cs
- StrongNameKeyPair.cs
- RectangleConverter.cs
- SqlDataSourceSelectingEventArgs.cs
- JsonGlobals.cs
- DataGrid.cs
- SecurityTokenResolver.cs
- FontWeight.cs
- DbTransaction.cs
- TableLayoutColumnStyleCollection.cs
- DateTimeOffsetStorage.cs
- ResourceDisplayNameAttribute.cs
- XamlClipboardData.cs
- RadioButton.cs
- XPathParser.cs
- OrCondition.cs
- Descriptor.cs
- RegistryHandle.cs