C# Class 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.
Inheritance: IEndpointBehavior, IClientMessageInspector
Afficher le fichier Open project: OfficeDev/Interop-TestSuites

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

AddBindingParameters() public méthode

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.
Résultat void

AfterReceiveReply() public méthode

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.
Résultat void

ApplyClientBehavior() public méthode

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.
Résultat void

ApplyDispatchBehavior() public méthode

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.
Résultat void

BeforeSendRequest() public méthode

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.
Résultat object

MessageInspector() public méthode

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.
Résultat System.IO

Validate() public méthode

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.
Résultat void