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
- WmlListAdapter.cs
- SoapEnumAttribute.cs
- CodeGeneratorAttribute.cs
- ObjectPersistData.cs
- DataGridViewCellValueEventArgs.cs
- StandardMenuStripVerb.cs
- DataComponentGenerator.cs
- Globals.cs
- RouteTable.cs
- IndexerNameAttribute.cs
- ObjectHelper.cs
- Array.cs
- RtfFormatStack.cs
- TabControlEvent.cs
- DescendantOverDescendantQuery.cs
- NumericUpDownAcceleration.cs
- SelectedPathEditor.cs
- DefaultAsyncDataDispatcher.cs
- TiffBitmapDecoder.cs
- NamedPermissionSet.cs
- DbConnectionFactory.cs
- Dictionary.cs
- METAHEADER.cs
- ContainerUtilities.cs
- DataSourceHelper.cs
- WebPartConnectVerb.cs
- SingleAnimation.cs
- SettingsSavedEventArgs.cs
- CallContext.cs
- StringStorage.cs
- ObjectIDGenerator.cs
- TagPrefixInfo.cs
- TraceSection.cs
- CommonEndpointBehaviorElement.cs
- CodeMemberProperty.cs
- TdsParserStaticMethods.cs
- OleDbFactory.cs
- AlignmentXValidation.cs
- QueuedDeliveryRequirementsMode.cs
- TypeConverterHelper.cs
- GetPageCompletedEventArgs.cs
- PopOutPanel.cs
- DataSourceView.cs
- EnumDataContract.cs
- XmlIgnoreAttribute.cs
- ConfigXmlReader.cs
- EastAsianLunisolarCalendar.cs
- WindowsUpDown.cs
- SoapBinding.cs
- ConfigurationStrings.cs
- CellIdBoolean.cs
- Bookmark.cs
- DefaultTraceListener.cs
- FrameworkContextData.cs
- SQLUtility.cs
- MouseWheelEventArgs.cs
- ProgressBar.cs
- SqlBooleanMismatchVisitor.cs
- TCPListener.cs
- TextRenderer.cs
- ToolBarButtonClickEvent.cs
- ECDiffieHellmanCng.cs
- BitmapEffectRenderDataResource.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ExponentialEase.cs
- UInt64Converter.cs
- SQLBytes.cs
- Drawing.cs
- SafeFileMappingHandle.cs
- SmuggledIUnknown.cs
- FormClosingEvent.cs
- ProfileSection.cs
- RegularExpressionValidator.cs
- XmlArrayAttribute.cs
- basecomparevalidator.cs
- DetailsViewDeletedEventArgs.cs
- PageClientProxyGenerator.cs
- PeerReferralPolicy.cs
- StylusPlugInCollection.cs
- WebBrowserEvent.cs
- XPathDocumentNavigator.cs
- CryptoApi.cs
- Pens.cs
- GiveFeedbackEvent.cs
- BindingExpression.cs
- Button.cs
- XmlUrlResolver.cs
- UIPermission.cs
- FileBasedResourceGroveler.cs
- SafeArchiveContext.cs
- RoutingSection.cs
- QueryStringParameter.cs
- _NativeSSPI.cs
- InputMethodStateChangeEventArgs.cs
- XamlBrushSerializer.cs
- CapiSymmetricAlgorithm.cs
- Rect3DValueSerializer.cs
- TimersDescriptionAttribute.cs
- WizardStepBase.cs
- TextBoxView.cs