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
- QueryExpr.cs
- OutArgument.cs
- AsymmetricKeyExchangeDeformatter.cs
- XmlEnumAttribute.cs
- DataSourceCache.cs
- HttpClientCertificate.cs
- DataControlFieldCell.cs
- ObfuscateAssemblyAttribute.cs
- ListControl.cs
- MimeBasePart.cs
- SerialPort.cs
- OutputWindow.cs
- DrawingContextDrawingContextWalker.cs
- CompilerInfo.cs
- DocumentViewer.cs
- RowParagraph.cs
- ClientTarget.cs
- XmlWrappingReader.cs
- XomlCompilerResults.cs
- SoapObjectInfo.cs
- IndexedString.cs
- diagnosticsswitches.cs
- EntitySqlQueryCacheEntry.cs
- SaveWorkflowAsyncResult.cs
- CapiNative.cs
- ResourceSetExpression.cs
- RTLAwareMessageBox.cs
- XamlTemplateSerializer.cs
- CanonicalFontFamilyReference.cs
- ComponentConverter.cs
- UrlMappingsSection.cs
- CustomWebEventKey.cs
- DataSourceHelper.cs
- SuppressIldasmAttribute.cs
- IPCCacheManager.cs
- NumberFunctions.cs
- PersonalizationStateQuery.cs
- FamilyTypeface.cs
- ProcessInputEventArgs.cs
- Triangle.cs
- AsyncPostBackTrigger.cs
- HttpValueCollection.cs
- StylusDevice.cs
- SendKeys.cs
- BooleanSwitch.cs
- X509InitiatorCertificateClientElement.cs
- NetCodeGroup.cs
- GradientStop.cs
- TemplateFactory.cs
- IQueryable.cs
- SplineQuaternionKeyFrame.cs
- PointConverter.cs
- SegmentInfo.cs
- ByteStreamGeometryContext.cs
- Stacktrace.cs
- SqlDataAdapter.cs
- OleAutBinder.cs
- ValidationHelper.cs
- CorrelationToken.cs
- sqlstateclientmanager.cs
- MapPathBasedVirtualPathProvider.cs
- MultilineStringConverter.cs
- ValueProviderWrapper.cs
- Int64KeyFrameCollection.cs
- ToolStripTextBox.cs
- QilScopedVisitor.cs
- HttpsTransportBindingElement.cs
- EntryWrittenEventArgs.cs
- XamlToRtfParser.cs
- BaseAppDomainProtocolHandler.cs
- TextBlockAutomationPeer.cs
- Point3DIndependentAnimationStorage.cs
- _IPv6Address.cs
- AbstractDataSvcMapFileLoader.cs
- SettingsAttributeDictionary.cs
- PenContexts.cs
- ImageSourceValueSerializer.cs
- processwaithandle.cs
- MemberListBinding.cs
- PKCS1MaskGenerationMethod.cs
- EndpointReference.cs
- BaseWebProxyFinder.cs
- SemanticResolver.cs
- MachineKeySection.cs
- SyndicationSerializer.cs
- UIServiceHelper.cs
- QuaternionKeyFrameCollection.cs
- CodeCompiler.cs
- XamlReader.cs
- BinaryFormatterWriter.cs
- InternalMappingException.cs
- IPipelineRuntime.cs
- Lease.cs
- ServiceContractGenerationContext.cs
- ImageAttributes.cs
- DateTimeFormatInfoScanner.cs
- Bitmap.cs
- ClipboardProcessor.cs
- Overlapped.cs
- ObservableCollectionDefaultValueFactory.cs