IHttpContextAccessor 인터페이스

정의

현재 HttpContext에 대한 액세스를 제공합니다(사용 가능한 경우).

public interface class IHttpContextAccessor
public interface IHttpContextAccessor
type IHttpContextAccessor = interface
Public Interface IHttpContextAccessor
파생

설명

이 인터페이스는 주의해서 사용해야 합니다. 비동기 호출에 AsyncLocal<T> 부정적인 성능 영향을 미칠 수 있는 에 의존합니다. 또한 테스트를 더 어렵게 만들 수 있는 "앰비언트 상태"에 대한 종속성을 만듭니다.

속성

HttpContext

현재 HttpContext를 가져오거나 설정합니다. 활성 HttpContext가 없으면 를 반환 null 합니다.

적용 대상