HttpContext.IServiceProvider.GetService(Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an object for the current service type.
virtual System::Object ^ System.IServiceProvider.GetService(Type ^ service) = IServiceProvider::GetService;
object IServiceProvider.GetService (Type service);
abstract member System.IServiceProvider.GetService : Type -> obj
override this.System.IServiceProvider.GetService : Type -> obj
Function GetService (service As Type) As Object Implements IServiceProvider.GetService
Parameters
- service
- Type
A type of HttpContext service to set the service provider to.
Returns
A HttpContext; otherwise, null
if no service is found.
Implements
Remarks
This method is useful to gain access to the underlying HttpWorkerRequest object.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.