/// <summary>
        /// Update routing table by the files that will found be requested directory.
        /// Also auto loking for core routing  table by "resources\routing\".
        ///
        /// In case if tables not found then create new one to provide example.
        /// </summary>
        /// <param name="directories"></param>
        public static void LoadRoutingTables(params string[] directories)
        {
            #region Load routing tables
            // Load routing tables
            routingTable = null;
            // From system folders.
            routingTable += RoutingTable.LoadRoutingTables(AppDomain.CurrentDomain.BaseDirectory + "resources\\routing\\", SearchOption.AllDirectories);
            // From custrom directories.
            foreach (string dir in directories)
            {
                routingTable += RoutingTable.LoadRoutingTables(dir, SearchOption.AllDirectories);
            }
            #endregion

            /* TODO Deprecated unnessesary code with requesting keys and tokens.
             #region Request public keys
             * foreach (Instruction instruction in routingTable.intructions)
             * {
             *  if (instruction is PartialAuthorizedInstruction pai)
             *  {
             *      Task.Run(async delegate()
             *      {
             *          // Waiting for guest token.
             *          await pai.TryToGetGuestTokenAsync(TerminationTokenSource.Token);
             *
             *          // If encryption requested.
             *          if (instruction.encryption)
             *          {
             *              // Request public key reciving.
             *              _ = GetValidSecretKeysViaPPAsync(instruction);
             *          }
             *      }
             *  }
             * }
             #endregion*/

            #region Validate
            // If routing table not found.
            if (routingTable.intructions.Count == 0)
            {
                //// Log error.
                //Console.WriteLine("ROUTING TABLE NOT FOUND: Create default table by directory \\resources\\routing\\ROUTING.xml");

                //// Set default intruction.
                //routingTable.intructions.Add(Instruction.Default);

                //// Save sample routing table to application files.
                //RoutingTable.SaveRoutingTable(routingTable, AppDomain.CurrentDomain.BaseDirectory + "resources\\routing\\", "ROUTING");
            }
            else
            {
                // Log error.
                Console.WriteLine("ROUTING TABLE: Detected {0} instructions.", routingTable.intructions.Count);
            }
            #endregion
        }