C# Class Nexus.Client.ModRepositories.Nexus.HttpUserAgentMessageInspector

An Client Message Inspector that sets the user-agent for the service call.
Inheritance: IClientMessageInspector
Afficher le fichier Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Méthodes publiques

Méthode Description
AfterReceiveReply ( Message &reply, object correlationState ) : void

Processes the reply message.

This does nothing.

BeforeSendRequest ( Message &request, IClientChannel channel ) : object

Processes the request message.

This adds the specified user-agent to the request.

HttpUserAgentMessageInspector ( string userAgent ) : System.ServiceModel

A simple constructor that initializes the object with the given values.

Method Details

AfterReceiveReply() public méthode

Processes the reply message.
This does nothing.
public AfterReceiveReply ( Message &reply, object correlationState ) : void
reply Message The received reply to process.
correlationState object The correlation state.
Résultat void

BeforeSendRequest() public méthode

Processes the request message.
This adds the specified user-agent to the request.
public BeforeSendRequest ( Message &request, IClientChannel channel ) : object
request Message The request to process.
channel IClientChannel The client channel.
Résultat object

HttpUserAgentMessageInspector() public méthode

A simple constructor that initializes the object with the given values.
public HttpUserAgentMessageInspector ( string userAgent ) : System.ServiceModel
userAgent string The user agent to use for the service calls.
Résultat System.ServiceModel