C# Класс Microsoft.Protocols.TestSuites.Common.MessageInspector

This class which implements the IEndpointBehavior and IClientMessageInspector interface is used to add MS-WOPI request header and store all the requests and responses for both MS-FSSHTTP and MS-WOPI.
Наследование: IEndpointBehavior, IClientMessageInspector
Показать файл Открыть проект

Открытые методы

Метод Описание
AddBindingParameters ( ServiceEndpoint endpoint, System bindingParameters ) : void

Implement the IEndpointBehavior interface to pass data at runtime to bindings to support custom behavior. In this implementation, this function will be kept empty.

AfterReceiveReply ( System &reply, object correlationState ) : void

Implementation does schema validation for the MS-FSSHTTP defined element after a reply message is received.

ApplyClientBehavior ( ServiceEndpoint endpoint, ClientRuntime clientRuntime ) : void

Implements a modification or extension of the client across an endpoint. In this implementation, this function will add a custom inspector to the client endpoint to add the MS-WOPI headers and do the schema validation.

ApplyDispatchBehavior ( ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher ) : void

Implements a modification or extension of the service across an endpoint. In this implementation, this function will be kept empty.

BeforeSendRequest ( System &request, System channel ) : object

Implementation will add the headers for MS-WOPI before a request message is sent to a service.

MessageInspector ( SharedContext context ) : System.IO

Initializes a new instance of the MessageInspector class with the specified context.

Validate ( ServiceEndpoint endpoint ) : void

Implement to confirm that the endpoint meets some intended criteria. In this implementation, this function will be kept empty.

Приватные методы

Метод Описание
AddHeader ( System &request, string headerKey, string value ) : void

This method is used to add headers to the MS-WOPI requests.

SizeOfWOPIMessage ( Message message ) : int

This method is used to calculate the message size.

Описание методов

AddBindingParameters() публичный Метод

Implement the IEndpointBehavior interface to pass data at runtime to bindings to support custom behavior. In this implementation, this function will be kept empty.
public AddBindingParameters ( ServiceEndpoint endpoint, System bindingParameters ) : void
endpoint System.ServiceModel.Description.ServiceEndpoint The endpoint to modify
bindingParameters System The objects that binding elements require to support the behavior.
Результат void

AfterReceiveReply() публичный Метод

Implementation does schema validation for the MS-FSSHTTP defined element after a reply message is received.
public AfterReceiveReply ( System &reply, object correlationState ) : void
reply System Specify the message to be transformed into types and handed back to the client application.
correlationState object Specify the correlation state data.
Результат void

ApplyClientBehavior() публичный Метод

Implements a modification or extension of the client across an endpoint. In this implementation, this function will add a custom inspector to the client endpoint to add the MS-WOPI headers and do the schema validation.
public ApplyClientBehavior ( ServiceEndpoint endpoint, ClientRuntime clientRuntime ) : void
endpoint System.ServiceModel.Description.ServiceEndpoint The endpoint that is to be customized.
clientRuntime System.ServiceModel.Dispatcher.ClientRuntime The client runtime to be customized.
Результат void

ApplyDispatchBehavior() публичный Метод

Implements a modification or extension of the service across an endpoint. In this implementation, this function will be kept empty.
public ApplyDispatchBehavior ( ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher ) : void
endpoint System.ServiceModel.Description.ServiceEndpoint The endpoint that exposes the contract.
endpointDispatcher System.ServiceModel.Dispatcher.EndpointDispatcher The endpoint dispatcher to be modified or extended.
Результат void

BeforeSendRequest() публичный Метод

Implementation will add the headers for MS-WOPI before a request message is sent to a service.
public BeforeSendRequest ( System &request, System channel ) : object
request System Specify the message to be sent to the service.
channel System Specify the client object channel.
Результат object

MessageInspector() публичный Метод

Initializes a new instance of the MessageInspector class with the specified context.
public MessageInspector ( SharedContext context ) : System.IO
context SharedContext Specify the context which will give information for MS-WOPI headers.
Результат System.IO

Validate() публичный Метод

Implement to confirm that the endpoint meets some intended criteria. In this implementation, this function will be kept empty.
public Validate ( ServiceEndpoint endpoint ) : void
endpoint System.ServiceModel.Description.ServiceEndpoint The endpoint to validate.
Результат void