PeerCastStation.UI.HTTP.APIHost.APIContext.CheckPorts C# (CSharp) Méthode

CheckPorts() private méthode

private CheckPorts ( ) : Newtonsoft.Json.Linq.JArray
Résultat Newtonsoft.Json.Linq.JArray
      public JArray CheckPorts()
      {
        int[] results = null;
        var port_checker = PeerCastApplication.Current.Plugins.GetPlugin<PeerCastStation.UI.PCPPortCheckerPlugin>();
        if (port_checker!=null) {
          var task = port_checker.CheckAsync();
          task.Wait();
          var result = task.Result;
          if (result.Success) {
            PeerCast.IsFirewalled = result.Ports.Length==0;
            owner.OpenedPorts = result.Ports;
            results = result.Ports;
          }
        }
        if (results!=null) {
          return new JArray(results);
        }
        else {
          return null;
        }
      }