Прочетете на английски Редактиране

Споделяне чрез


HttpContextBase.GetService(Type) Method

Definition

When overridden in a derived class, returns an object for the current service type.

C#
public virtual object GetService(Type serviceType);

Parameters

serviceType
Type

The type of service object to get.

Returns

The current service type, or null if no service is found.

Implements

Exceptions

Applies to

Продукт Версии
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1