C# Class Google.Api.Ads.Common.Lib.TraceListener

Listens to SOAP messages sent and received by this library.
Inheritance: Google.Api.Ads.Common.Lib.SoapListener
Afficher le fichier Open project: Zocdoc/googleads-adwords-dotnet-lib

Méthodes publiques

Méthode Description
CleanupAfterCall ( ) : void

Cleans up any resources after an API call.

HandleMessage ( XmlDocument soapMessage, AdsClient service, SoapMessageDirection direction ) : void

Handles the SOAP message.

InitForCall ( ) : void

Initializes the listener for handling an API call.

Méthodes protégées

Méthode Description
AppendHeadersToSoapXml ( string soapRequest, string headers ) : string

Appends the HTTP headers to SOAP xml.

FormatHttpRequest ( string soapRequest ) : string

Creates a formatted http request text, to be written into HTTP logs.

FormatHttpResponse ( string soapResponse ) : string

Creates a formatted http response text, to be written into HTTP logs.

FormatSoapRequest ( WebRequest webRequest, string soapRequest ) : string

Creates a formatted soap request text, to be written into SOAP logs.

FormatSoapResponse ( WebResponse webResponse, string soapResponse ) : string

Creates a formatted soap response text, to be written into SOAP logs.

GetFieldsToMask ( ) : string[]

Gets a list of fields to be masked in xml logs.

GetTimeStamp ( ) : string

Gets the current timestamp as a formatted string.

MaskCredentialsInLogs ( XmlDocument soapMessageXml, string fieldNames ) : void

Masks a list of fields in the SOAP message before logging it.

TraceListener ( AppConfig config ) : System

Protected constructor.

Private Methods

Méthode Description
PerformLogging ( AdsClient service, string soapRequest, string soapResponse ) : void

Performs the SOAP and HTTP logging.

Method Details

AppendHeadersToSoapXml() protected méthode

Appends the HTTP headers to SOAP xml.
protected AppendHeadersToSoapXml ( string soapRequest, string headers ) : string
soapRequest string The SOAP request.
headers string The HTTP headers.
Résultat string

CleanupAfterCall() public méthode

Cleans up any resources after an API call.
public CleanupAfterCall ( ) : void
Résultat void

FormatHttpRequest() protected méthode

Creates a formatted http request text, to be written into HTTP logs.
protected FormatHttpRequest ( string soapRequest ) : string
soapRequest string The request xml for this SOAP call.
Résultat string

FormatHttpResponse() protected méthode

Creates a formatted http response text, to be written into HTTP logs.
protected FormatHttpResponse ( string soapResponse ) : string
soapResponse string The response xml for this SOAP call.
Résultat string

FormatSoapRequest() protected méthode

Creates a formatted soap request text, to be written into SOAP logs.
protected FormatSoapRequest ( WebRequest webRequest, string soapRequest ) : string
webRequest System.Net.WebRequest The web request for this SOAP call.
soapRequest string The request xml for this SOAP call.
Résultat string

FormatSoapResponse() protected méthode

Creates a formatted soap response text, to be written into SOAP logs.
protected FormatSoapResponse ( WebResponse webResponse, string soapResponse ) : string
webResponse System.Net.WebResponse The web response for this SOAP call.
soapResponse string The response xml for this SOAP call.
Résultat string

GetFieldsToMask() protected abstract méthode

Gets a list of fields to be masked in xml logs.
protected abstract GetFieldsToMask ( ) : string[]
Résultat string[]

GetTimeStamp() protected méthode

Gets the current timestamp as a formatted string.
protected GetTimeStamp ( ) : string
Résultat string

HandleMessage() public méthode

Handles the SOAP message.
public HandleMessage ( XmlDocument soapMessage, AdsClient service, SoapMessageDirection direction ) : void
soapMessage System.Xml.XmlDocument The SOAP message.
service AdsClient The SOAP service.
direction SoapMessageDirection The direction of message.
Résultat void

InitForCall() public méthode

Initializes the listener for handling an API call.
public InitForCall ( ) : void
Résultat void

MaskCredentialsInLogs() protected méthode

Masks a list of fields in the SOAP message before logging it.
protected MaskCredentialsInLogs ( XmlDocument soapMessageXml, string fieldNames ) : void
soapMessageXml System.Xml.XmlDocument The SOAP message, loaded as an XmlDocument. ///
fieldNames string The list of field names to be masked.
Résultat void

TraceListener() protected méthode

Protected constructor.
protected TraceListener ( AppConfig config ) : System
config AppConfig The config class.
Résultat System