Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / HandlerFactoryWrapper.cs / 1305376 / 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.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.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
- FrameworkTextComposition.cs
- DesignTimeParseData.cs
- SmtpException.cs
- UIElement3D.cs
- WebBrowserEvent.cs
- GacUtil.cs
- IIS7ConfigurationLoader.cs
- ObservableCollection.cs
- CqlParser.cs
- RemoteWebConfigurationHostServer.cs
- DataSysAttribute.cs
- WebFormsRootDesigner.cs
- Profiler.cs
- SimpleModelProvider.cs
- InternalConfigSettingsFactory.cs
- SqlBulkCopyColumnMappingCollection.cs
- Span.cs
- PermissionToken.cs
- SizeChangedInfo.cs
- ParagraphResult.cs
- ETagAttribute.cs
- CapacityStreamGeometryContext.cs
- LayoutEngine.cs
- MDIClient.cs
- SHA1Cng.cs
- UserUseLicenseDictionaryLoader.cs
- ConfigXmlReader.cs
- WSTrust.cs
- ListViewItemSelectionChangedEvent.cs
- HtmlUtf8RawTextWriter.cs
- Socket.cs
- BooleanStorage.cs
- BaseWebProxyFinder.cs
- FormViewUpdateEventArgs.cs
- CryptoStream.cs
- ObjectItemConventionAssemblyLoader.cs
- SizeFConverter.cs
- __Filters.cs
- StylusButtonCollection.cs
- ReverseComparer.cs
- WebPartsSection.cs
- ProgressBarRenderer.cs
- LoginCancelEventArgs.cs
- ImageDrawing.cs
- ReflectionPermission.cs
- FamilyCollection.cs
- SvcMapFileLoader.cs
- SelectedGridItemChangedEvent.cs
- CompoundFileDeflateTransform.cs
- AnnotationHighlightLayer.cs
- HttpHandlerActionCollection.cs
- HttpProcessUtility.cs
- ScriptResourceDefinition.cs
- WebBrowserUriTypeConverter.cs
- PropertyDescriptorCollection.cs
- HtmlInputSubmit.cs
- DataTableMapping.cs
- MimeFormImporter.cs
- HatchBrush.cs
- MediaContextNotificationWindow.cs
- AdRotatorDesigner.cs
- SecurityTokenResolver.cs
- FixedSOMLineCollection.cs
- PageAdapter.cs
- BamlStream.cs
- SyndicationItemFormatter.cs
- PageContent.cs
- NeutralResourcesLanguageAttribute.cs
- IndividualDeviceConfig.cs
- ApplicationContext.cs
- ListViewContainer.cs
- PropertyBuilder.cs
- RijndaelCryptoServiceProvider.cs
- EdmToObjectNamespaceMap.cs
- JournalEntry.cs
- SqlDataAdapter.cs
- QilInvokeEarlyBound.cs
- PartialClassGenerationTaskInternal.cs
- WebMessageBodyStyleHelper.cs
- TextSpanModifier.cs
- QilLiteral.cs
- SchemaImporterExtensionElement.cs
- XmlAggregates.cs
- Visual3D.cs
- ArraySortHelper.cs
- ParsedAttributeCollection.cs
- RootBuilder.cs
- ScrollContentPresenter.cs
- ProfileGroupSettingsCollection.cs
- SessionEndingEventArgs.cs
- EUCJPEncoding.cs
- CatalogZoneBase.cs
- HwndHostAutomationPeer.cs
- RuntimeResourceSet.cs
- ToolStripDropDown.cs
- PageCodeDomTreeGenerator.cs
- EdmProperty.cs
- DesignerActionVerbList.cs
- _LoggingObject.cs
- CommonObjectSecurity.cs