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
- CompoundFileStorageReference.cs
- HttpListenerElement.cs
- LoadItemsEventArgs.cs
- CorePropertiesFilter.cs
- SamlSecurityTokenAuthenticator.cs
- BindingNavigator.cs
- ToolStripProgressBar.cs
- SoapAttributeOverrides.cs
- ToolbarAUtomationPeer.cs
- ConfigurationErrorsException.cs
- HtmlTextArea.cs
- ListBindingConverter.cs
- invalidudtexception.cs
- FormsAuthenticationUser.cs
- PreservationFileReader.cs
- WindowPatternIdentifiers.cs
- DataMemberAttribute.cs
- ServiceTimeoutsElement.cs
- ProfileBuildProvider.cs
- ThicknessAnimationBase.cs
- RolePrincipal.cs
- DefaultAuthorizationContext.cs
- BindableTemplateBuilder.cs
- SimpleTypesSurrogate.cs
- EditorAttribute.cs
- WindowsToolbarItemAsMenuItem.cs
- BitmapEffectvisualstate.cs
- X509CertificateInitiatorClientCredential.cs
- CqlParserHelpers.cs
- ServiceBusyException.cs
- TypeInfo.cs
- handlecollector.cs
- FileEnumerator.cs
- SoapInteropTypes.cs
- HttpRuntime.cs
- EdmSchemaError.cs
- SurrogateChar.cs
- XmlObjectSerializerReadContextComplexJson.cs
- METAHEADER.cs
- Int32KeyFrameCollection.cs
- Point3DIndependentAnimationStorage.cs
- HashMembershipCondition.cs
- brushes.cs
- TrackingQueryElement.cs
- TypeUnloadedException.cs
- Panel.cs
- WebPartsSection.cs
- TaskFormBase.cs
- WsrmTraceRecord.cs
- ProviderConnectionPoint.cs
- XamlToRtfParser.cs
- EncryptedXml.cs
- DesignTimeVisibleAttribute.cs
- AsyncParams.cs
- ResolvedKeyFrameEntry.cs
- RowToParametersTransformer.cs
- TokenBasedSet.cs
- SymbolMethod.cs
- IPEndPoint.cs
- ISFClipboardData.cs
- Stack.cs
- PathGradientBrush.cs
- PersistenceTypeAttribute.cs
- BindingValueChangedEventArgs.cs
- EventDescriptor.cs
- ReadOnlyPermissionSet.cs
- NumericUpDown.cs
- _NegoState.cs
- ByteAnimationUsingKeyFrames.cs
- MouseEventArgs.cs
- OverrideMode.cs
- DataListGeneralPage.cs
- HttpBindingExtension.cs
- GrowingArray.cs
- ClientRuntime.cs
- BindingSource.cs
- StylusPointProperties.cs
- EventPrivateKey.cs
- DataFieldConverter.cs
- DataGridViewButtonCell.cs
- ParameterModifier.cs
- ConnectionsZone.cs
- RequestSecurityTokenSerializer.cs
- TypeRefElement.cs
- CustomErrorCollection.cs
- WebScriptEnablingElement.cs
- FixedNode.cs
- FontNamesConverter.cs
- OleDbErrorCollection.cs
- BaseTemplateParser.cs
- AesCryptoServiceProvider.cs
- AutomationProperties.cs
- ListQueryResults.cs
- Image.cs
- Models.cs
- DbConnectionStringCommon.cs
- HMACSHA256.cs
- ReadonlyMessageFilter.cs
- TypeHelpers.cs
- IntSecurity.cs