Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / SimpleHandlerFactory.cs / 1 / SimpleHandlerFactory.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * Handler Factory implementation for ASP.NET files * * Copyright (c) 2000 Microsoft Corporation */ namespace System.Web.UI { using System; using System.Web.Compilation; using Debug = System.Web.Util.Debug; /* * Handler Factory implementation for ASP.NET files */ internal class SimpleHandlerFactory : IHttpHandlerFactory2 { internal SimpleHandlerFactory() { } public virtual IHttpHandler GetHandler(HttpContext context, string requestType, string virtualPath, string path) { // This should never get called //Debug.Assert(false); return ((IHttpHandlerFactory2)this).GetHandler(context, requestType, VirtualPath.CreateNonRelative(virtualPath), path); } IHttpHandler IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) { BuildResultCompiledType result = (BuildResultCompiledType)BuildManager.GetVPathBuildResult( context, virtualPath); // Make sure the type has the correct base class (ASURT 123677) Util.CheckAssignableType(typeof(IHttpHandler), result.ResultType); return (IHttpHandler) result.CreateInstance(); } public virtual void ReleaseHandler(IHttpHandler handler) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * Handler Factory implementation for ASP.NET files * * Copyright (c) 2000 Microsoft Corporation */ namespace System.Web.UI { using System; using System.Web.Compilation; using Debug = System.Web.Util.Debug; /* * Handler Factory implementation for ASP.NET files */ internal class SimpleHandlerFactory : IHttpHandlerFactory2 { internal SimpleHandlerFactory() { } public virtual IHttpHandler GetHandler(HttpContext context, string requestType, string virtualPath, string path) { // This should never get called //Debug.Assert(false); return ((IHttpHandlerFactory2)this).GetHandler(context, requestType, VirtualPath.CreateNonRelative(virtualPath), path); } IHttpHandler IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) { BuildResultCompiledType result = (BuildResultCompiledType)BuildManager.GetVPathBuildResult( context, virtualPath); // Make sure the type has the correct base class (ASURT 123677) Util.CheckAssignableType(typeof(IHttpHandler), result.ResultType); return (IHttpHandler) result.CreateInstance(); } public virtual void ReleaseHandler(IHttpHandler handler) { } } } // 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
- MSHTMLHost.cs
- AssociationSet.cs
- DrawingContextDrawingContextWalker.cs
- TrustLevel.cs
- SectionXmlInfo.cs
- RtfToXamlReader.cs
- ScrollProviderWrapper.cs
- ZipIOExtraFieldZip64Element.cs
- PenContext.cs
- IteratorDescriptor.cs
- NamespaceQuery.cs
- DbConnectionStringBuilder.cs
- ExpressionConverter.cs
- SQLDecimalStorage.cs
- SafeMILHandle.cs
- Enlistment.cs
- VariableModifiersHelper.cs
- MsmqInputSessionChannelListener.cs
- ValidationRuleCollection.cs
- ScaleTransform.cs
- ClientProxyGenerator.cs
- HitTestFilterBehavior.cs
- StatusBarPanel.cs
- MarkupCompilePass2.cs
- CodeAttributeArgumentCollection.cs
- HostSecurityManager.cs
- CompensationDesigner.cs
- WebRequest.cs
- FtpWebRequest.cs
- SqlUDTStorage.cs
- MultilineStringEditor.cs
- AssemblyNameProxy.cs
- BasePattern.cs
- KoreanCalendar.cs
- CompilerGeneratedAttribute.cs
- WebPartUserCapability.cs
- XamlTreeBuilderBamlRecordWriter.cs
- AddInActivator.cs
- PropertyTabAttribute.cs
- SignedXml.cs
- CellTreeNode.cs
- WebPartDisplayModeCancelEventArgs.cs
- RowUpdatedEventArgs.cs
- HttpsHostedTransportConfiguration.cs
- GridViewRow.cs
- RsaKeyIdentifierClause.cs
- MetadataArtifactLoaderCompositeResource.cs
- SqlDelegatedTransaction.cs
- Point3D.cs
- OleDbPropertySetGuid.cs
- SafeReversePInvokeHandle.cs
- Processor.cs
- XPathNavigatorKeyComparer.cs
- UnknownBitmapDecoder.cs
- XmlSchemaNotation.cs
- OrCondition.cs
- FixedElement.cs
- ProxyWebPartConnectionCollection.cs
- DiagnosticTrace.cs
- ScriptDescriptor.cs
- ExpressionBuilderContext.cs
- SrgsElementFactory.cs
- WebPartDisplayModeCollection.cs
- WindowsFont.cs
- StyleXamlParser.cs
- ChangeBlockUndoRecord.cs
- XmlRootAttribute.cs
- NonParentingControl.cs
- OperationContractAttribute.cs
- MenuRenderer.cs
- ResolvedKeyFrameEntry.cs
- AuthenticationModuleElement.cs
- ManagementEventArgs.cs
- StringBlob.cs
- LabelDesigner.cs
- OfTypeExpression.cs
- IntegerValidatorAttribute.cs
- PartialList.cs
- RemoveStoryboard.cs
- WindowsFormsSectionHandler.cs
- Deflater.cs
- MetadataCacheItem.cs
- DynamicVirtualDiscoSearcher.cs
- ViewLoader.cs
- Tool.cs
- StoryFragments.cs
- Button.cs
- AtomParser.cs
- SQLResource.cs
- followingsibling.cs
- Ipv6Element.cs
- SchemaSetCompiler.cs
- WSSecurityTokenSerializer.cs
- ResXBuildProvider.cs
- HttpWebRequestElement.cs
- RoutedEventValueSerializer.cs
- ItemChangedEventArgs.cs
- DataGridItemAutomationPeer.cs
- SerializationInfo.cs
- MatrixAnimationBase.cs