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
- WindowsRegion.cs
- SizeAnimationBase.cs
- CompModSwitches.cs
- CookieHandler.cs
- SecurityElement.cs
- ReadOnlyPropertyMetadata.cs
- StylusPointPropertyUnit.cs
- DataGridRelationshipRow.cs
- IgnoreFileBuildProvider.cs
- RadioButtonStandardAdapter.cs
- EpmContentSerializerBase.cs
- SplitterPanel.cs
- AnimationTimeline.cs
- SecurityDescriptor.cs
- XmlSchemaDocumentation.cs
- XamlToRtfWriter.cs
- MachineKeyValidationConverter.cs
- DefaultTypeArgumentAttribute.cs
- ByteArrayHelperWithString.cs
- ConfigXmlComment.cs
- Win32KeyboardDevice.cs
- GreenMethods.cs
- HasCopySemanticsAttribute.cs
- LockCookie.cs
- SymLanguageVendor.cs
- SerializationHelper.cs
- entityreference_tresulttype.cs
- BitmapEffectvisualstate.cs
- Section.cs
- ClusterSafeNativeMethods.cs
- PermissionListSet.cs
- HtmlInputFile.cs
- WebScriptServiceHostFactory.cs
- CodeLabeledStatement.cs
- WebPartZoneBaseDesigner.cs
- EntityContainer.cs
- SettingsPropertyNotFoundException.cs
- VectorCollectionValueSerializer.cs
- InstanceDataCollectionCollection.cs
- ListBoxItemWrapperAutomationPeer.cs
- DragEvent.cs
- EasingKeyFrames.cs
- DynamicActivity.cs
- ListViewTableRow.cs
- CodeFieldReferenceExpression.cs
- CodeBinaryOperatorExpression.cs
- SchemaImporter.cs
- HttpModuleActionCollection.cs
- Viewport2DVisual3D.cs
- RC2.cs
- ConfigurationException.cs
- PenContext.cs
- WebPartsSection.cs
- CustomAssemblyResolver.cs
- BooleanSwitch.cs
- Catch.cs
- ClientScriptItemCollection.cs
- ClientRequest.cs
- SqlDependency.cs
- ResourceProviderFactory.cs
- ToolTipAutomationPeer.cs
- KoreanCalendar.cs
- BindingSourceDesigner.cs
- ConfigXmlWhitespace.cs
- SecureUICommand.cs
- invalidudtexception.cs
- __ComObject.cs
- SmiRequestExecutor.cs
- DataGridViewUtilities.cs
- SingleAnimationBase.cs
- DrawingCollection.cs
- DataBoundControl.cs
- ToolStripEditorManager.cs
- SchemaImporterExtensionElement.cs
- GenericIdentity.cs
- DiscoveryReference.cs
- TextTreeInsertUndoUnit.cs
- Options.cs
- MultiBindingExpression.cs
- _TransmitFileOverlappedAsyncResult.cs
- SqlTypeConverter.cs
- HostExecutionContextManager.cs
- GatewayIPAddressInformationCollection.cs
- MatcherBuilder.cs
- XmlValidatingReaderImpl.cs
- PingReply.cs
- InstanceCollisionException.cs
- ResumeStoryboard.cs
- DataGridCheckBoxColumn.cs
- WorkflowInstanceTerminatedRecord.cs
- TemplateXamlParser.cs
- HttpListenerRequest.cs
- GenericIdentity.cs
- EntityTypeEmitter.cs
- InheritanceRules.cs
- ContentHostHelper.cs
- AppDomainGrammarProxy.cs
- SpeechSeg.cs
- ObjectPersistData.cs
- DrawItemEvent.cs