C# Class Microsoft.Protocols.TestSuites.MS_WOPI.DiscoveryRequestListener

This class is used to help the implementation of the discovery operation.
Inheritance: HelperBase, IDisposable
Afficher le fichier Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Méthodes publiques

Méthode Description
DiscoveryRequestListener ( string hostDiscoveryMachineName, string responseXmlForDiscovery ) : System

Initializes a new instance of the DiscoveryRequestListener class.

Dispose ( ) : void

A method is used to implement the IDisposable interface, it allows the user to dispose the current instance if user need to release allocated resources.

StartListen ( ) : Thread

A method is used to start the listen thread to listen the discovery request.

StopListen ( ) : void

A method is used to stop listen process. This method will abort the thread which is listening discovery request and release all resource are used by the thread.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

A method is used to perform custom dispose logic when the GC try to collect this instance.

ListenToRequest ( ) : void

A method is used to listening the discovery request. It will be executed by a thread which is started on ListenThreadInstance method.

RestartListener ( ) : void

A method is used to restart the HTTP listener. It will dispose the original HTTP listener and then re-generate a HTTP listen instance to listen request.

SetPrefixForListener ( HttpListener listenerInstance ) : void

A method is used to set the prefix for listener.

Method Details

DiscoveryRequestListener() public méthode

Initializes a new instance of the DiscoveryRequestListener class.
public DiscoveryRequestListener ( string hostDiscoveryMachineName, string responseXmlForDiscovery ) : System
hostDiscoveryMachineName string A parameter represents the machine name which will listen the discovery request. The value must be the name of the current machine.
responseXmlForDiscovery string A parameter represents the discovery response which will response to WOPI server.
Résultat System

Dispose() public méthode

A method is used to implement the IDisposable interface, it allows the user to dispose the current instance if user need to release allocated resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

A method is used to perform custom dispose logic when the GC try to collect this instance.
protected Dispose ( bool disposing ) : void
disposing bool A parameter represents the disposing way, the 'true' means it is called from user code by calling IDisposable.Dispose, otherwise it means the GC is trying to process this instance.
Résultat void

ListenToRequest() protected méthode

A method is used to listening the discovery request. It will be executed by a thread which is started on ListenThreadInstance method.
protected ListenToRequest ( ) : void
Résultat void

RestartListener() protected méthode

A method is used to restart the HTTP listener. It will dispose the original HTTP listener and then re-generate a HTTP listen instance to listen request.
protected RestartListener ( ) : void
Résultat void

SetPrefixForListener() protected méthode

A method is used to set the prefix for listener.
protected SetPrefixForListener ( HttpListener listenerInstance ) : void
listenerInstance System.Net.HttpListener A parameter represents the HttpListener instance which will be set the listened prefix.
Résultat void

StartListen() public méthode

A method is used to start the listen thread to listen the discovery request.
public StartListen ( ) : Thread
Résultat Thread

StopListen() public méthode

A method is used to stop listen process. This method will abort the thread which is listening discovery request and release all resource are used by the thread.
public StopListen ( ) : void
Résultat void