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
- Graphics.cs
- PartBasedPackageProperties.cs
- MasterPageBuildProvider.cs
- DialogDivider.cs
- OdbcCommand.cs
- RectAnimationUsingKeyFrames.cs
- Triplet.cs
- DesigntimeLicenseContextSerializer.cs
- SystemTcpConnection.cs
- ChildTable.cs
- OperationFormatUse.cs
- NativeMethods.cs
- TextViewSelectionProcessor.cs
- SupportingTokenSecurityTokenResolver.cs
- LocalizationParserHooks.cs
- ObjectReaderCompiler.cs
- XamlHostingSectionGroup.cs
- TableStyle.cs
- PreparingEnlistment.cs
- CharAnimationBase.cs
- Options.cs
- DiagnosticsElement.cs
- Logging.cs
- WebConfigurationHostFileChange.cs
- WebPartManager.cs
- Calendar.cs
- CrossContextChannel.cs
- XsdValidatingReader.cs
- AccessorTable.cs
- TransactionChannelFactory.cs
- ZoneButton.cs
- ImageListUtils.cs
- MemberJoinTreeNode.cs
- ScalarType.cs
- BulletedList.cs
- EventTask.cs
- BinaryNegotiation.cs
- TemplateBuilder.cs
- SolidColorBrush.cs
- MatrixCamera.cs
- ActivityFunc.cs
- SchemaElementDecl.cs
- DateTimeFormat.cs
- TimeSpanValidator.cs
- CallSiteHelpers.cs
- DrawingImage.cs
- QilCloneVisitor.cs
- XmlHierarchicalDataSourceView.cs
- ClientRuntimeConfig.cs
- X509PeerCertificateAuthenticationElement.cs
- TemplateBaseAction.cs
- OutOfMemoryException.cs
- ThumbButtonInfoCollection.cs
- OSFeature.cs
- EncoderBestFitFallback.cs
- SoapSchemaImporter.cs
- CompositeTypefaceMetrics.cs
- Wizard.cs
- WebPartUtil.cs
- UnsafeNativeMethods.cs
- FileVersionInfo.cs
- CodeBinaryOperatorExpression.cs
- ListControlStringCollectionEditor.cs
- ForeignKeyFactory.cs
- EditCommandColumn.cs
- StatusBarItem.cs
- SoundPlayer.cs
- GroupPartitionExpr.cs
- HierarchicalDataSourceConverter.cs
- EastAsianLunisolarCalendar.cs
- DescendentsWalkerBase.cs
- PriorityQueue.cs
- XmlBoundElement.cs
- ContainsRowNumberChecker.cs
- CounterSampleCalculator.cs
- XpsFixedDocumentReaderWriter.cs
- CopyOnWriteList.cs
- MemoryPressure.cs
- StreamGeometryContext.cs
- ModelPropertyDescriptor.cs
- InternalConfigHost.cs
- DateRangeEvent.cs
- ProcessThread.cs
- RightsManagementPermission.cs
- UTF8Encoding.cs
- VariantWrapper.cs
- BitmapCodecInfoInternal.cs
- ProfilePropertyNameValidator.cs
- mediapermission.cs
- AnnotationService.cs
- XsltConvert.cs
- WSTrustDec2005.cs
- ColumnTypeConverter.cs
- ImageFormatConverter.cs
- Mapping.cs
- TextEncodedRawTextWriter.cs
- URL.cs
- DataServiceProviderMethods.cs
- MemberExpressionHelper.cs
- TreeView.cs