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
- ListViewItem.cs
- ActivityBuilderXamlWriter.cs
- XmlNodeChangedEventArgs.cs
- SystemFonts.cs
- ClusterUtils.cs
- RemoteWebConfigurationHostStream.cs
- ActionItem.cs
- EntitySetBase.cs
- SimpleMailWebEventProvider.cs
- ObjectDataSource.cs
- BoundPropertyEntry.cs
- UriSection.cs
- DataGridCell.cs
- TextOutput.cs
- PrimitiveType.cs
- ObjectViewQueryResultData.cs
- TextSelectionProcessor.cs
- QueryFunctions.cs
- Stylus.cs
- StrongNameIdentityPermission.cs
- EditorPart.cs
- LayoutTableCell.cs
- PerformanceCounterManager.cs
- Axis.cs
- HtmlImage.cs
- ChannelServices.cs
- SqlDataSourceSelectingEventArgs.cs
- HijriCalendar.cs
- BezierSegment.cs
- ListBindingHelper.cs
- Control.cs
- StringArrayConverter.cs
- BitmapEffectGroup.cs
- PenThread.cs
- SizeAnimationClockResource.cs
- DetailsViewInsertEventArgs.cs
- Operator.cs
- TreeBuilderBamlTranslator.cs
- CanonicalXml.cs
- ISO2022Encoding.cs
- ItemsChangedEventArgs.cs
- ByteRangeDownloader.cs
- DataListItemEventArgs.cs
- StrongNameIdentityPermission.cs
- FilteredAttributeCollection.cs
- MemoryFailPoint.cs
- ObjectStateFormatter.cs
- XmlCountingReader.cs
- IndexedGlyphRun.cs
- CorrelationManager.cs
- Hash.cs
- RowBinding.cs
- UniqueIdentifierService.cs
- TransformerInfo.cs
- NullableDecimalSumAggregationOperator.cs
- TypeBuilderInstantiation.cs
- ViewgenGatekeeper.cs
- StrokeFIndices.cs
- StringValidatorAttribute.cs
- WebPageTraceListener.cs
- ControlPropertyNameConverter.cs
- VectorValueSerializer.cs
- AvTraceFormat.cs
- DynamicDataRouteHandler.cs
- QilStrConcat.cs
- XmlSchemaImport.cs
- ApplicationServicesHostFactory.cs
- SettingsContext.cs
- ProviderSettingsCollection.cs
- JsonSerializer.cs
- UserNamePasswordServiceCredential.cs
- ProfilePropertySettings.cs
- EventLogQuery.cs
- DecimalFormatter.cs
- CodeAttachEventStatement.cs
- MenuTracker.cs
- DoubleCollection.cs
- SqlXmlStorage.cs
- HttpServerVarsCollection.cs
- Baml2006KnownTypes.cs
- WebPartHelpVerb.cs
- Set.cs
- SqlDataReader.cs
- ModifierKeysValueSerializer.cs
- Ray3DHitTestResult.cs
- DictionaryKeyPropertyAttribute.cs
- PreservationFileReader.cs
- InternalMappingException.cs
- odbcmetadatacollectionnames.cs
- TypeReference.cs
- InputGestureCollection.cs
- OrderingQueryOperator.cs
- StorageModelBuildProvider.cs
- XmlSubtreeReader.cs
- MultipartIdentifier.cs
- NotImplementedException.cs
- SelectionEditingBehavior.cs
- RemoveStoryboard.cs
- BitmapEffectDrawingContextWalker.cs
- TypeReference.cs