Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / Configuration / HandlerFactoryWrapper.cs / 2 / 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 != null && !_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 != null && !_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
- FlowDocumentReaderAutomationPeer.cs
- HttpListenerException.cs
- NumberSubstitution.cs
- SchemaObjectWriter.cs
- PolicyConversionContext.cs
- RawAppCommandInputReport.cs
- ReachFixedPageSerializer.cs
- ValueQuery.cs
- LifetimeServices.cs
- EventQueueState.cs
- LicenseManager.cs
- XmlArrayAttribute.cs
- ToolStripItemClickedEventArgs.cs
- OLEDB_Enum.cs
- GroupJoinQueryOperator.cs
- NamespaceCollection.cs
- Invariant.cs
- PropertyTabAttribute.cs
- NullReferenceException.cs
- ConfigurationStrings.cs
- ObjectPersistData.cs
- AliasGenerator.cs
- WS2007HttpBinding.cs
- PersistenceProvider.cs
- Rect3DValueSerializer.cs
- ControlCollection.cs
- GlyphCache.cs
- ReachUIElementCollectionSerializer.cs
- BevelBitmapEffect.cs
- BitStream.cs
- ZipIOLocalFileBlock.cs
- InvokeWebService.cs
- CompilerErrorCollection.cs
- EventLogPermissionEntryCollection.cs
- EventWaitHandle.cs
- VarInfo.cs
- TagPrefixInfo.cs
- DelegatedStream.cs
- ProfileInfo.cs
- XmlSchemaExporter.cs
- VisualStyleRenderer.cs
- TableProviderWrapper.cs
- SafeThreadHandle.cs
- MinMaxParagraphWidth.cs
- URLString.cs
- WebPartCloseVerb.cs
- ContextItem.cs
- SemanticResultKey.cs
- Thread.cs
- TextEffect.cs
- StagingAreaInputItem.cs
- HierarchicalDataSourceDesigner.cs
- AbsoluteQuery.cs
- RowUpdatingEventArgs.cs
- GridViewAutomationPeer.cs
- IntSecurity.cs
- WindowsListViewGroup.cs
- SessionStateContainer.cs
- PassportAuthenticationModule.cs
- GridViewColumnCollection.cs
- UIElementParaClient.cs
- Transactions.cs
- MemberInitExpression.cs
- ArrayTypeMismatchException.cs
- Int64Animation.cs
- MaskInputRejectedEventArgs.cs
- DocumentGrid.cs
- WpfXamlType.cs
- XmlArrayAttribute.cs
- SystemThemeKey.cs
- ConfigXmlElement.cs
- ExecutionEngineException.cs
- LabelLiteral.cs
- TypeListConverter.cs
- CapabilitiesUse.cs
- MultiBindingExpression.cs
- PropertyGridView.cs
- EncoderExceptionFallback.cs
- ObjectItemCollection.cs
- MessageAction.cs
- ControlCollection.cs
- LogEntryDeserializer.cs
- TemplateBindingExtensionConverter.cs
- TargetParameterCountException.cs
- EncryptedHeaderXml.cs
- WmlSelectionListAdapter.cs
- FileLoadException.cs
- ActivationArguments.cs
- StructuralObject.cs
- HttpValueCollection.cs
- exports.cs
- ControlSerializer.cs
- EntityDataSourceUtil.cs
- RenamedEventArgs.cs
- PrintPreviewGraphics.cs
- WinFormsSecurity.cs
- NamespaceEmitter.cs
- Span.cs
- IItemProperties.cs
- DataGridViewSelectedColumnCollection.cs