コード例 #1
0
        /// <summary>
        /// 映射值
        /// </summary>
        /// <param name="Param"></param>
        public void ExecuteCallData(object Param)
        {
            JObject Obj      = (Param as string).ToModel <JObject>();
            var     CallData = Obj["MiddleResult"].ToJson().ToModel <SocketResultDefault>();

            CallEvent.Instance().Response = new Dictionary <string, object> {
                { "SocketJsonData", CallData.SocketJsonData.ToModel <object>() }
            };
        }
コード例 #2
0
ファイル: ProxyBasic.cs プロジェクト: EmilyEdna/XExten
        /// <summary>
        /// 重新连接通信中心
        /// </summary>
        /// <param name="Action"></param>
        public static void ReOpenInternalSocket(Action <ProxyBasic> Action)
        {
            ProxyBasic Client = new ProxyBasic();

            Action(Client);
            if (Call.SocketClient.IsConnected)
            {
                Call.SocketClient.DisConnect();
            }
            CallEvent.Instance().Changed += new CallEvent.ResultEventHandler(CallEventAction.Instance().OnResponse);
            Client.InitInternalSocket(Client.SockInfoIP, Client.SockInfoPort, DependencyExecute.Instance.FindLibrary());
        }
コード例 #3
0
ファイル: ProxyBasic.cs プロジェクト: EmilyEdna/XExten
        /// <summary>
        /// 初始化通信中心Socket
        /// </summary>
        /// <param name="Action"></param>
        /// <param name="UseServer"></param>
        public static void InitInternalSocket(Action <ProxyBasic> Action, bool UseServer = false)
        {
            ProxyBasic Client = new ProxyBasic();

            Action(Client);
            SocketConstConfig.ClientPort = Client.ClientPort;
            if (UseServer)
            {
                CallEvent.Instance().Changed += new CallEvent.ResultEventHandler(CallEventAction.Instance().OnResponse);
                Client.InitInternalSocket(Client.SockInfoIP, Client.SockInfoPort, DependencyExecute.Instance.FindLibrary());
            }
        }