Share via


IContextManager 인터페이스

정의

채널에서 컨텍스트를 가져오고 설정할 수 있는 인터페이스를 정의합니다.

public interface class IContextManager
public interface IContextManager
type IContextManager = interface
Public Interface IContextManager

설명

값 집합과 함께 NotAllowed 사용하는 WSHttpContextBinding 채널의 경우 세션을 설정하는 새 채널이 채널에 의미 체계를 적용 NotAllowed 하기 위해 호출될 때마다 GetProperty 생성되므로 를 사용하여 IContextManager 클라이언트에서 컨텍스트를 검색할 수 없습니다. 즉, 이 경우 컨텍스트가 클라이언트로 제대로 전파되더라도 를 사용하여 IContextManager검색할 수 없습니다. 다음 코드와 같이 를 사용하여 ContextMessageProperty 검색할 수 있습니다.

using (new OperationContextScope((IContextChannel)channel))  
{  
    channel.MyChannel("Test");  
    ContextMessageProperty context;  
    if (ContextMessageProperty.TryGet(OperationContext.Current.IncomingMessageProperties, out context))  
    {  
        Console.WriteLine(context.Count);  
    }  
}  

속성

Enabled

컨텍스트 관리를 사용하도록 설정했는지 여부를 나타내는 값을 가져오거나 설정합니다.

메서드

GetContext()

컨텍스트를 가져옵니다.

SetContext(IDictionary<String,String>)

컨텍스트를 설정합니다.

적용 대상