Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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 != 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
- ListSortDescription.cs
- ResourceReferenceKeyNotFoundException.cs
- CustomCategoryAttribute.cs
- Lazy.cs
- SecurityPolicySection.cs
- ControlDesigner.cs
- ContainerAction.cs
- JoinCqlBlock.cs
- ZoomingMessageFilter.cs
- WindowsTitleBar.cs
- FileSystemEventArgs.cs
- DataGridItemCollection.cs
- TransportManager.cs
- XPathLexer.cs
- SafeHandle.cs
- AsyncMethodInvoker.cs
- QilStrConcatenator.cs
- ToolboxDataAttribute.cs
- WeakEventManager.cs
- ToggleProviderWrapper.cs
- SevenBitStream.cs
- SerializationException.cs
- DeploymentExceptionMapper.cs
- Effect.cs
- StrokeCollectionDefaultValueFactory.cs
- DataListCommandEventArgs.cs
- ContainerParaClient.cs
- FigureHelper.cs
- StorageMappingItemCollection.cs
- RSACryptoServiceProvider.cs
- ApplicationCommands.cs
- FileSystemInfo.cs
- ConnectionPoint.cs
- WindowsToolbarItemAsMenuItem.cs
- Event.cs
- SmtpDigestAuthenticationModule.cs
- PerformanceCounter.cs
- JsonCollectionDataContract.cs
- PermissionAttributes.cs
- CompilerGlobalScopeAttribute.cs
- HttpsHostedTransportConfiguration.cs
- FormViewInsertEventArgs.cs
- DataContract.cs
- InkCollectionBehavior.cs
- ThrowHelper.cs
- AvTrace.cs
- SqlBulkCopyColumnMappingCollection.cs
- DataColumn.cs
- XmlWhitespace.cs
- DurableDispatcherAddressingFault.cs
- WebPartManagerInternals.cs
- HintTextConverter.cs
- TableRowGroupCollection.cs
- ObjectAnimationUsingKeyFrames.cs
- DataControlFieldCollection.cs
- CodeGroup.cs
- MsmqOutputSessionChannel.cs
- SoapAttributes.cs
- CompositeScriptReference.cs
- SqlGenericUtil.cs
- ProtocolElement.cs
- UnsafeNativeMethods.cs
- SqlBulkCopyColumnMappingCollection.cs
- HtmlLinkAdapter.cs
- CaseKeyBox.ViewModel.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- XmlDataDocument.cs
- MatrixUtil.cs
- PlainXmlDeserializer.cs
- TextMetrics.cs
- ControlPaint.cs
- EdmConstants.cs
- CodeTypeDelegate.cs
- URL.cs
- Vector3DCollection.cs
- GatewayIPAddressInformationCollection.cs
- QuotedPrintableStream.cs
- BinaryObjectWriter.cs
- EntityStoreSchemaFilterEntry.cs
- DataDocumentXPathNavigator.cs
- UpdateTranslator.cs
- Cursors.cs
- WorkflowInstanceExtensionProvider.cs
- ContainerControl.cs
- PerformanceCountersElement.cs
- OverrideMode.cs
- ProfileManager.cs
- Input.cs
- WebPartManager.cs
- SerializerDescriptor.cs
- SqlUdtInfo.cs
- SystemIcmpV4Statistics.cs
- PenContext.cs
- CustomError.cs
- ZipIOLocalFileHeader.cs
- DataKeyCollection.cs
- IndentedTextWriter.cs
- ModuleBuilder.cs
- CodeNamespaceImport.cs
- SymmetricCryptoHandle.cs