Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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;
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ExtendedProtectionPolicy.cs
- DesignerDataColumn.cs
- SqlInfoMessageEvent.cs
- StreamReader.cs
- TraceContext.cs
- HttpStreamFormatter.cs
- Helpers.cs
- SudsWriter.cs
- FloatSumAggregationOperator.cs
- Utils.cs
- ColumnCollection.cs
- ResourceType.cs
- PublisherIdentityPermission.cs
- ObjectDataSourceDisposingEventArgs.cs
- BrowserTree.cs
- RightsManagementEncryptionTransform.cs
- OleDbError.cs
- BaseCAMarshaler.cs
- DataPagerCommandEventArgs.cs
- ToolStripRendererSwitcher.cs
- PageParserFilter.cs
- SelfIssuedTokenFactoryCredential.cs
- GroupBoxDesigner.cs
- ConditionalAttribute.cs
- ConnectivityStatus.cs
- LineGeometry.cs
- DocumentOrderComparer.cs
- Ops.cs
- SendKeys.cs
- TableProvider.cs
- BuilderElements.cs
- EnumBuilder.cs
- CorrelationScope.cs
- TypeNameParser.cs
- RuntimeIdentifierPropertyAttribute.cs
- PasswordBox.cs
- ConfigurationValidatorBase.cs
- WorkflowApplicationUnloadedException.cs
- XmlUtil.cs
- storepermission.cs
- FrugalList.cs
- EntityDataSourceContainerNameConverter.cs
- SqlErrorCollection.cs
- AVElementHelper.cs
- Mapping.cs
- VisualStateChangedEventArgs.cs
- BaseCollection.cs
- SqlNodeAnnotation.cs
- Calendar.cs
- Console.cs
- Polygon.cs
- WebPartConnection.cs
- WeakReferenceList.cs
- SystemNetHelpers.cs
- TypographyProperties.cs
- AppliedDeviceFiltersEditor.cs
- DesignTimeParseData.cs
- ReadingWritingEntityEventArgs.cs
- ServicePointManagerElement.cs
- InvalidCommandTreeException.cs
- IpcChannelHelper.cs
- Lasso.cs
- VectorValueSerializer.cs
- URLIdentityPermission.cs
- KeyEventArgs.cs
- IsolatedStorageFileStream.cs
- LinqDataSourceStatusEventArgs.cs
- RightsManagementUser.cs
- ToolStripDropDownClosedEventArgs.cs
- SubMenuStyle.cs
- SizeIndependentAnimationStorage.cs
- SapiRecoInterop.cs
- RuleSettingsCollection.cs
- BitmapVisualManager.cs
- CodeIdentifiers.cs
- x509utils.cs
- panel.cs
- SerialErrors.cs
- SchemaElementLookUpTableEnumerator.cs
- AsyncResult.cs
- PropertyDescriptorCollection.cs
- URL.cs
- EntityContainerEntitySet.cs
- XmlNodeChangedEventManager.cs
- CompiledQuery.cs
- NavigationExpr.cs
- StringFunctions.cs
- HttpResponseInternalWrapper.cs
- PreviewPageInfo.cs
- GroupedContextMenuStrip.cs
- wgx_commands.cs
- IndexedString.cs
- DataGridViewComboBoxColumnDesigner.cs
- DeclaredTypeValidator.cs
- ContentElementAutomationPeer.cs
- DecoderReplacementFallback.cs
- EditorZoneBase.cs
- HttpModuleActionCollection.cs
- StateWorkerRequest.cs
- ViewBase.cs