From 1bb1878fe5b44f36628d9100743308d9a09ec95a Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Thu, 11 Jul 2019 17:11:24 +0800 Subject: [PATCH] update Former-commit-id: 8044b2e1a4be03237cd31a8c5ec7032923a0a518 --- projects/IoTCenter/Services/PageHub.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/projects/IoTCenter/Services/PageHub.cs b/projects/IoTCenter/Services/PageHub.cs index ce749073..d9a4082e 100644 --- a/projects/IoTCenter/Services/PageHub.cs +++ b/projects/IoTCenter/Services/PageHub.cs @@ -29,10 +29,7 @@ namespace IoTCenter.Services } else if (message == "ApiCallback") { - if (!string.IsNullOrEmpty(connectionId)) - { - this.ServerToClient(connectionId, "ApiCallback", message); - } + this.ApiCallback(message, connectionId); } } @@ -96,5 +93,13 @@ namespace IoTCenter.Services } } } + + public void ApiCallback(string message, string connectionId) + { + if (!string.IsNullOrEmpty(connectionId)) + { + this.ServerToClient(connectionId, "ApiCallback", message); + } + } } } \ No newline at end of file