Share via


XPathMessageFilter.Match 메서드

정의

메시지나 XML 문서가 XPath 필터의 쿼리 조건을 충족하는지 여부를 결정합니다.

오버로드

Match(Message)

지정된 메시지가 XPath 필터 기준을 충족하는지 여부를 테스트합니다. 이 형식에서는 메시지 본문에 액세스할 수 없습니다.

Match(MessageBuffer)

버퍼링된 메시지가 XPath 필터의 쿼리 조건을 충족하는지 여부를 결정합니다.

Match(SeekableXPathNavigator)

지정된 최적 XPath 탐색기에서 제공된 XML 문서가 XPath 필터의 쿼리 조건을 충족하는지 여부를 결정합니다.

Match(XPathNavigator)

지정된 XPath 탐색기를 통해 필터를 평가합니다.

설명

이러한 메서드는 메시지에 대해 하나의 필터를 확인합니다. 여러 필터에 대해 메시지를 확인해야 하는 경우 필터를 필터 테이블에 배치한 다음 테이블에서 제공하는 일치 메서드를 사용합니다.

메시지 본문이 아닌 메시지 헤더만 테스트해야 하는 경우 메서드를 Match 사용합니다.

메시지 본문의 일부를 테스트해야 하는 경우 메서드를 Match 사용합니다.

XPath 쿼리를 포함하는 테스트의 경우 의 나머지 오버로드 Match중 하나를 사용합니다.

Match(Message)

지정된 메시지가 XPath 필터 기준을 충족하는지 여부를 테스트합니다. 이 형식에서는 메시지 본문에 액세스할 수 없습니다.

public:
 override bool Match(System::ServiceModel::Channels::Message ^ message);
public override bool Match (System.ServiceModel.Channels.Message message);
override this.Match : System.ServiceModel.Channels.Message -> bool
Public Overrides Function Match (message As Message) As Boolean

매개 변수

message
Message

테스트할 Message입니다.

반환

Message가 필터 조건을 충족하면 true이고, 그렇지 않으면 false입니다.

예외

message이(가) null인 경우

XPath 평가에서 메시지 본문을 검사하려고 시도한 경우

컴파일러 오류가 발생한 경우

설명

메서드를 XPathMessageFilter.Match 사용하여 본문의 요소를 일치시킬 수 있습니다. 엔진이 XPath 식을 평가하기 위해 메시지 본문에 액세스하려고 하면 이 메서드에서 예외가 throw됩니다. 이렇게 하면 필터 엔진이 본문 스트림에 액세스하지 않도록 할 수 있습니다.

적용 대상

Match(MessageBuffer)

버퍼링된 메시지가 XPath 필터의 쿼리 조건을 충족하는지 여부를 결정합니다.

public:
 override bool Match(System::ServiceModel::Channels::MessageBuffer ^ messageBuffer);
public override bool Match (System.ServiceModel.Channels.MessageBuffer messageBuffer);
override this.Match : System.ServiceModel.Channels.MessageBuffer -> bool
Public Overrides Function Match (messageBuffer As MessageBuffer) As Boolean

매개 변수

messageBuffer
MessageBuffer

테스트할 MessageBuffer입니다.

반환

Match(MessageBuffer)가 필터 조건을 충족하면 true이고, 그렇지 않으면 false입니다.

예외

message이(가) null인 경우

컴파일러 오류가 발생한 경우

설명

를 사용할 수 있는 경우 메서드의 Match 이 오버로드를 MessageBuffer 사용합니다. 이 양식은 메시지 본문을 검사할 수 있습니다.

적용 대상

Match(SeekableXPathNavigator)

지정된 최적 XPath 탐색기에서 제공된 XML 문서가 XPath 필터의 쿼리 조건을 충족하는지 여부를 결정합니다.

public:
 bool Match(System::ServiceModel::Dispatcher::SeekableXPathNavigator ^ navigator);
public bool Match (System.ServiceModel.Dispatcher.SeekableXPathNavigator navigator);
override this.Match : System.ServiceModel.Dispatcher.SeekableXPathNavigator -> bool
Public Function Match (navigator As SeekableXPathNavigator) As Boolean

매개 변수

navigator
SeekableXPathNavigator

테스트할 데이터를 제공하는 SeekableXPathNavigator입니다.

반환

SeekableXPathNavigator에서 제공된 데이터가 필터 기준을 충족하면 true이고, 그렇지 않으면 false입니다.

예외

navigator이(가) null인 경우

컴파일러 오류가 발생한 경우

설명

클래스는 SeekableXPathNavigator 쿼리를 XPathNavigator 보다 효율적으로 실행하는 메서드를 사용하여 클래스를 확장합니다.

적용 대상

Match(XPathNavigator)

지정된 XPath 탐색기를 통해 필터를 평가합니다.

public:
 bool Match(System::Xml::XPath::XPathNavigator ^ navigator);
public bool Match (System.Xml.XPath.XPathNavigator navigator);
override this.Match : System.Xml.XPath.XPathNavigator -> bool
Public Function Match (navigator As XPathNavigator) As Boolean

매개 변수

navigator
XPathNavigator

테스트할 데이터를 제공하는 XPathNavigator입니다.

반환

XPathNavigator에서 제공된 데이터가 필터 기준을 충족하면 true이고, 그렇지 않으면 false입니다.

예외

navigator이(가) null인 경우

컴파일러 오류가 발생한 경우

적용 대상