C# Класс Microsoft.Protocols.TestSuites.MS_WOPI.DiscoveryRequestListener

This class is used to help the implementation of the discovery operation.
Наследование: HelperBase, IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

Защищенные методы

Метод Описание
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.

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

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

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.
Результат System

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

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
Результат void

Dispose() защищенный Метод

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.
Результат void

ListenToRequest() защищенный Метод

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
Результат void

RestartListener() защищенный Метод

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
Результат void

SetPrefixForListener() защищенный Метод

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.
Результат void

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

A method is used to start the listen thread to listen the discovery request.
public StartListen ( ) : Thread
Результат Thread

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

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
Результат void