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
Col·laboreu amb nosaltres a GitHub
La font d'aquest contingut es pot trobar al GitHub, on també podeu crear i revisar problemes i sol·licituds d'extracció. Per obtenir més informació, consulteu la nostra guia per a col·laboradors.