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
- LostFocusEventManager.cs
- DeploymentSection.cs
- ServiceHostFactory.cs
- ControlOperationBehavior.cs
- XmlSchemaRedefine.cs
- BuildProviderUtils.cs
- DocumentReferenceCollection.cs
- DomNameTable.cs
- ToolboxItemCollection.cs
- CodeGotoStatement.cs
- Error.cs
- Operand.cs
- TextEditorSpelling.cs
- ConnectionConsumerAttribute.cs
- GridViewCancelEditEventArgs.cs
- CompositeControl.cs
- BufferedStream.cs
- InfoCardCryptoHelper.cs
- WinEventWrap.cs
- CommonRemoteMemoryBlock.cs
- ScriptControl.cs
- UInt32Storage.cs
- CodeIterationStatement.cs
- DataTransferEventArgs.cs
- ProviderException.cs
- DictionaryManager.cs
- ConstraintCollection.cs
- CodeAttributeDeclarationCollection.cs
- Component.cs
- XmlSchemaImport.cs
- OracleConnectionFactory.cs
- ReferenceEqualityComparer.cs
- TransportSecurityBindingElement.cs
- NameValueCollection.cs
- WsiProfilesElement.cs
- RuntimeConfig.cs
- InstancePersistenceException.cs
- MouseButtonEventArgs.cs
- XmlSchemaDocumentation.cs
- MouseEventArgs.cs
- RenderingBiasValidation.cs
- WebReferencesBuildProvider.cs
- Win32Native.cs
- CapabilitiesUse.cs
- SQLGuidStorage.cs
- SwitchLevelAttribute.cs
- RegexCompiler.cs
- LinqDataView.cs
- EventLogPermissionEntry.cs
- WebPartUserCapability.cs
- WebBrowser.cs
- IndentedTextWriter.cs
- DelegatedStream.cs
- DesigntimeLicenseContextSerializer.cs
- CompoundFileStreamReference.cs
- SettingsPropertyNotFoundException.cs
- TraceUtils.cs
- QueryAsyncResult.cs
- XmlSchemaExporter.cs
- XPathDocumentBuilder.cs
- SequentialOutput.cs
- ControlEvent.cs
- SecurityContextTokenCache.cs
- SchemaImporterExtensionElementCollection.cs
- IdnMapping.cs
- XmlSubtreeReader.cs
- _NtlmClient.cs
- PostBackOptions.cs
- UserPreferenceChangedEventArgs.cs
- HtmlTitle.cs
- SplitterEvent.cs
- IdentityHolder.cs
- DataControlFieldTypeEditor.cs
- ScrollChrome.cs
- ReferenceSchema.cs
- BitmapEffectInput.cs
- IPCCacheManager.cs
- GcSettings.cs
- InputLangChangeRequestEvent.cs
- GridSplitter.cs
- MetadataUtilsSmi.cs
- SortQueryOperator.cs
- AnimationStorage.cs
- ProgressChangedEventArgs.cs
- Size.cs
- VariableAction.cs
- HtmlTextBoxAdapter.cs
- XmlSchemaAppInfo.cs
- HierarchicalDataSourceConverter.cs
- SafeNativeMemoryHandle.cs
- SrgsRule.cs
- DBDataPermissionAttribute.cs
- ExpressionSelection.cs
- OutputCacheModule.cs
- SslStream.cs
- DBSqlParserColumn.cs
- Select.cs
- RegexParser.cs
- StringAnimationBase.cs
- DataGridParentRows.cs