Esempio n. 1
0
 public void OnScriptAdded(DebugScriptInfo info)
 {
     if (AddScript != null)
     {
         AddScript(info);
     }
 }
Esempio n. 2
0
        public void SetDebugScriptInfo(DebugScriptInfo info)
        {
            OnScriptAdded(info);
            callback = OperationContext.Current.GetCallbackChannel <IWCFDebugServiceDuplexCallback>();

            //Callback.SetGlobal("some global value");

            //for dev: set timeout to something more useful
            //it actually does not matter; once this connection is
            //gone, the tabpage more or less is useless.
            ((IContextChannel)OperationContext.Current.Channel).OperationTimeout = new TimeSpan(0, 0, 2);
        }
        public void SetDebugScriptInfo(DebugScriptInfo info)
        {
            OnScriptAdded(info);
            callback = OperationContext.Current.GetCallbackChannel<IWCFDebugServiceDuplexCallback>();

            //Callback.SetGlobal("some global value");

            //for dev: set timeout to something more useful
            //it actually does not matter; once this connection is
            //gone, the tabpage more or less is useless.
            ((IContextChannel)OperationContext.Current.Channel).OperationTimeout = new TimeSpan(0, 0, 2) ;
        }
Esempio n. 4
0
        public void SendDebugScriptInfo(string info)
        {
            try
            {
                var selfPlayer = _contexts.player.flagSelfEntity;
                if (selfPlayer.hasNetwork)
                {
                    var channel = selfPlayer.network.NetworkChannel;
                    if (channel != null)
                    {
                        var msg = DebugScriptInfo.Allocate();
                        msg.Info = info;
                        channel.SendReliable((int)EClient2ServerMessage.DebugScriptInfo, msg);
                        msg.ReleaseReference();

                        _logger.DebugFormat("Send Debug Script Message {0}", info);
                    }
                }
            }
            catch (Exception e)
            {
                _logger.Error("Fail to Send DebugScriptInfo", e);
            }
        }
 public void OnScriptAdded(DebugScriptInfo info)
 {
     if (AddScript != null)
         AddScript(info);
 }