Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ControlValuePropertyAttribute.cs
- StylusTouchDevice.cs
- BindingExpressionUncommonField.cs
- ZoneLinkButton.cs
- XmlReflectionImporter.cs
- NullableFloatSumAggregationOperator.cs
- AutomationProperties.cs
- AuthenticationConfig.cs
- Int64.cs
- BaseTemplateCodeDomTreeGenerator.cs
- Compensate.cs
- AncillaryOps.cs
- XmlDocument.cs
- CapabilitiesPattern.cs
- MonthChangedEventArgs.cs
- Decimal.cs
- PageThemeBuildProvider.cs
- WeakReference.cs
- BooleanAnimationBase.cs
- StringStorage.cs
- FormParameter.cs
- NetStream.cs
- SqlIdentifier.cs
- MarkedHighlightComponent.cs
- ListViewUpdatedEventArgs.cs
- TextShapeableCharacters.cs
- PropertyCollection.cs
- ApplicationDirectory.cs
- List.cs
- LayoutEngine.cs
- GatewayIPAddressInformationCollection.cs
- WindowsGrip.cs
- ValidatingReaderNodeData.cs
- SchemaCollectionPreprocessor.cs
- KeyBinding.cs
- KeyInterop.cs
- MsmqInputMessagePool.cs
- RtfToXamlReader.cs
- ConnectionManagementElement.cs
- ActionItem.cs
- GuidelineSet.cs
- WindowsHyperlink.cs
- OraclePermission.cs
- Renderer.cs
- MsdtcClusterUtils.cs
- CalendarButtonAutomationPeer.cs
- ObservableDictionary.cs
- SqlDependencyUtils.cs
- ResourceDisplayNameAttribute.cs
- CommandField.cs
- SafeWaitHandle.cs
- ProtocolsConfiguration.cs
- JoinTreeSlot.cs
- SafeNativeMemoryHandle.cs
- AnonymousIdentificationSection.cs
- DataBindingExpressionBuilder.cs
- ModifierKeysConverter.cs
- WebScriptClientGenerator.cs
- SmiEventSink.cs
- LambdaCompiler.Logical.cs
- CalendarItem.cs
- SqlTriggerContext.cs
- DataContractAttribute.cs
- ForeignKeyConstraint.cs
- EventlogProvider.cs
- RepeaterItemCollection.cs
- DrawingBrush.cs
- DataListDesigner.cs
- QueryActivatableWorkflowsCommand.cs
- ToolStripPanelRenderEventArgs.cs
- IdentityValidationException.cs
- MetadataProperty.cs
- TypeValidationEventArgs.cs
- ElementNotEnabledException.cs
- ToolboxService.cs
- StylusPointPropertyUnit.cs
- MetadataArtifactLoaderComposite.cs
- SaveFileDialog.cs
- MetadataArtifactLoaderCompositeResource.cs
- HwndProxyElementProvider.cs
- UserMapPath.cs
- WebPartTransformerCollection.cs
- XmlSchemaSimpleTypeList.cs
- TimerEventSubscription.cs
- CommandLibraryHelper.cs
- WebBrowserNavigatingEventHandler.cs
- BuildProvider.cs
- HttpProxyCredentialType.cs
- CodeTypeReferenceExpression.cs
- DtrList.cs
- DisplayInformation.cs
- HttpsTransportBindingElement.cs
- HelpFileFileNameEditor.cs
- SqlUtil.cs
- SynchronizedDispatch.cs
- AsyncCompletedEventArgs.cs
- exports.cs
- EastAsianLunisolarCalendar.cs
- mediaclock.cs
- IgnorePropertiesAttribute.cs