public KernelOutputKeywordsResponse KernelOutputKeywords(KernelOutputKeywordsRequest request)
 {
     try {
         var data = HostRoot.Instance.KernelOutputKeywordSet;
         return(KernelOutputKeywordsResponse.Ok(data.AsEnumerable().Select(a => KernelOutputKeywordData.Create(a)).ToList(), NTMiner.Timestamp.GetTimestamp(HostRoot.Instance.KernelOutputKeywordTimestamp)));
     }
     catch (Exception e) {
         Logger.ErrorDebugLine(e);
         return(ResponseBase.ServerError <KernelOutputKeywordsResponse>(e.Message));
     }
 }
 public DataResponse <List <KernelOutputKeywordData> > KernelOutputKeywords(KernelOutputKeywordsRequest request)
 {
     try {
         var data = HostRoot.Instance.KernelOutputKeywordSet;
         return(DataResponse <List <KernelOutputKeywordData> > .Ok(data.Select(a => KernelOutputKeywordData.Create(a)).ToList()));
     }
     catch (Exception e) {
         Logger.ErrorDebugLine(e);
         return(ResponseBase.ServerError <DataResponse <List <KernelOutputKeywordData> > >(e.Message));
     }
 }
Example #3
0
 public void GetKernelOutputKeywords(Action <KernelOutputKeywordsResponse, Exception> callback)
 {
     try {
         KernelOutputKeywordsRequest request = new KernelOutputKeywordsRequest {
         };
         RpcRoot.PostAsync(_host, _port, _controllerName, nameof(IKernelOutputKeywordController.KernelOutputKeywords), request, callback);
     }
     catch (Exception e) {
         Logger.ErrorDebugLine(e);
         callback?.Invoke(null, e);
     }
 }
Example #4
0
        public void GetKernelOutputKeywords(Action <KernelOutputKeywordsResponse, Exception> callback)
        {
            KernelOutputKeywordsRequest request = new KernelOutputKeywordsRequest();

            RpcRoot.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IKernelOutputKeywordController.KernelOutputKeywords), request, callback);
        }