This class is used to help the implementation of the discovery operation.
상속: HelperBase, IDisposable
예제 #1
0
 /// <summary>
 /// A method is used to dispose the discovery request listener.
 /// </summary>
 public static void DisposeDiscoveryListener()
 {
     if (discoveryListenerInstance != null)
     {
         discoveryListenerInstance.Dispose();
         discoveryListenerInstance = null;
     }
 }
예제 #2
0
        public static void ClassCleanup()
        {
            TestSuiteHelper.CleanUpDiscoveryProcess(CurrentTestClientName, SutController);
            string discoveryListenerLog = DiscoveryRequestListener.GetLogs(typeof(DiscoveryRequestListener));

            BaseTestSite.Log.Add(LogEntryKind.Debug, discoveryListenerLog);

            // Clean up all the added files.
            DeleteCollectedFiles(AddedFilesRecorder);
            TestClassBase.Cleanup();
        }
예제 #3
0
        /// <summary>
        /// A method is used to start listening the discovery request from the WOPI server. If the listen thread has existed, the DiscoverProcessHelper will not start any new listen thread.
        /// </summary>
        /// <param name="currentTestClient">A parameter represent the current test client which acts as WOPI client to listen the discovery request.</param>
        /// <param name="progId">A parameter represents the id of program which is associated with folder level visit in discovery process. This value must be valid for WOPI server. For Microsoft products, this value can be "OneNote.Notebook". It is used to ensure the WOPI server can support folder level visit ability in WOPI mode when receive the value from the discovery response.</param>
        public static void StartDiscoveryListen(string currentTestClient, string progId)
        {
            DiscoveryProcessHelper.CheckInputParameterNullOrEmpty <string>(currentTestClient, "currentTestClient", "StartDiscoveryListen");
            DiscoveryProcessHelper.CheckInputParameterNullOrEmpty <string>(progId, "progId", "StartDiscoveryListen");

            if (null == discoveryListenerInstance)
            {
                string discoveryXmlResponse = GetDiscoveryResponseXmlString(currentTestClient, progId);
                discoveryListenerInstance = new DiscoveryRequestListener(currentTestClient, discoveryXmlResponse);
                discoveryListenerInstance.StartListen();
            }
        }
 /// <summary>
 /// A method is used to dispose the discovery request listener.
 /// </summary>
 public static void DisposeDiscoveryListener()
 {
    if (discoveryListenerInstance != null)
    {
        discoveryListenerInstance.Dispose();
        discoveryListenerInstance = null;
    }
 }
        /// <summary>
        /// A method is used to start listening the discovery request from the WOPI server. If the listen thread has existed, the DiscoverProcessHelper will not start any new listen thread.
        /// </summary>
        /// <param name="currentTestClient">A parameter represent the current test client which acts as WOPI client to listen the discovery request.</param>
        /// <param name="progId">A parameter represents the id of program which is associated with folder level visit in discovery process. This value must be valid for WOPI server. For Microsoft products, this value can be "OneNote.Notebook". It is used to ensure the WOPI server can support folder level visit ability in WOPI mode when receive the value from the discovery response.</param>
        public static void StartDiscoveryListen(string currentTestClient, string progId)
        {
            DiscoveryProcessHelper.CheckInputParameterNullOrEmpty<string>(currentTestClient, "currentTestClient", "StartDiscoveryListen");
            DiscoveryProcessHelper.CheckInputParameterNullOrEmpty<string>(progId, "progId", "StartDiscoveryListen");

           if (null == discoveryListenerInstance)
           {
               string discoveryXmlResponse = GetDiscoveryResponseXmlString(currentTestClient, progId);
               discoveryListenerInstance = new DiscoveryRequestListener(currentTestClient, discoveryXmlResponse);
               discoveryListenerInstance.StartListen();
           }
        }