Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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.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
- DocumentPage.cs
- BuildManagerHost.cs
- NavigationWindowAutomationPeer.cs
- XsdDateTime.cs
- XmlSchemaAttributeGroupRef.cs
- PersistenceProviderBehavior.cs
- ActiveXSite.cs
- DrawingImage.cs
- DbDataAdapter.cs
- CodeTypeOfExpression.cs
- RegexMatchCollection.cs
- ScriptModule.cs
- ContextMenu.cs
- MethodExpr.cs
- SectionUpdates.cs
- GeometryHitTestResult.cs
- FtpRequestCacheValidator.cs
- ClientEndpointLoader.cs
- CDSCollectionETWBCLProvider.cs
- WizardStepBase.cs
- FlowDocumentPaginator.cs
- XamlReaderHelper.cs
- StrokeRenderer.cs
- RuleValidation.cs
- HtmlImage.cs
- AppDomainAttributes.cs
- OwnerDrawPropertyBag.cs
- CacheMemory.cs
- UnionExpr.cs
- BaseHashHelper.cs
- HttpCapabilitiesSectionHandler.cs
- CompilationRelaxations.cs
- _ChunkParse.cs
- ApplicationManager.cs
- FileDialog_Vista.cs
- DynamicDataExtensions.cs
- TraceContextEventArgs.cs
- BindingEntityInfo.cs
- Int64KeyFrameCollection.cs
- CalendarKeyboardHelper.cs
- HeaderUtility.cs
- PackagingUtilities.cs
- dsa.cs
- Mouse.cs
- StoragePropertyMapping.cs
- NameSpaceExtractor.cs
- DoubleLink.cs
- BoundColumn.cs
- DataRecord.cs
- DataGridToolTip.cs
- MruCache.cs
- TextEditorCharacters.cs
- TreeNodeSelectionProcessor.cs
- CacheManager.cs
- InstanceHandleConflictException.cs
- GroupBox.cs
- GlyphRunDrawing.cs
- ObjectDataSourceDisposingEventArgs.cs
- shaperfactoryquerycachekey.cs
- DiscriminatorMap.cs
- CodeExporter.cs
- ClassicBorderDecorator.cs
- PersonalizableAttribute.cs
- ExpandSegment.cs
- KnownColorTable.cs
- ActivityWithResultWrapper.cs
- OleDbFactory.cs
- SqlBinder.cs
- SharedDp.cs
- Marshal.cs
- LogRestartAreaEnumerator.cs
- XsdDataContractExporter.cs
- ContractNamespaceAttribute.cs
- HtmlTableRowCollection.cs
- RotateTransform.cs
- HtmlEmptyTagControlBuilder.cs
- CacheOutputQuery.cs
- ObservableDictionary.cs
- ValidatorUtils.cs
- DynamicUpdateCommand.cs
- TransformCollection.cs
- SchemaImporterExtensionsSection.cs
- Effect.cs
- EntityDataSourceWrapperCollection.cs
- XPathDocumentIterator.cs
- ExpressionConverter.cs
- UTF32Encoding.cs
- RegexMatch.cs
- ComboBox.cs
- BulletedListEventArgs.cs
- Socket.cs
- RepeatInfo.cs
- XmlObjectSerializerWriteContextComplex.cs
- TextDecorationCollectionConverter.cs
- FillErrorEventArgs.cs
- BasicExpressionVisitor.cs
- WebPartUtil.cs
- UserControl.cs
- ConstrainedDataObject.cs
- PeerApplication.cs