示例#1
0
 public MNetworkAction(int WindowUid, NetworkDelegateTemplate DataDelegate, Dispatcher Dispatcher = null, string KeyNetwork = null, string UniqueDelegateName = null, bool NotSingle = false)
 {
     this.UniqueDelegateName = UniqueDelegateName;
     this.WindowUid          = WindowUid;
     this.KeyNetwork         = KeyNetwork;
     this.DataDelegate       = DataDelegate;
     this.Dispatcher         = Dispatcher;
     this.NotSingle          = NotSingle;
 }
示例#2
0
 public static void Add(NetworkDelegateTemplate Delegate, Dispatcher Dispatcher = null, int WindowUid = -1, string KeyNetwork = null, string UniqueDelegateName = null, bool NotSingle = false)
 {
     if (NotSingle || UniqueDelegateName == null || !NetworkActions.Exists(x => x.UniqueDelegateName == UniqueDelegateName && x.KeyNetwork == KeyNetwork))
     {
         Debug.Log($"Регистрация делегата: WindowUid - {WindowUid}, KeyNetwork - {KeyNetwork}");
         NetworkActions.Add(new MNetworkAction(WindowUid, Delegate, Dispatcher, KeyNetwork, UniqueDelegateName, NotSingle));
     }
     else
     {
         Debug.Log($"Обновление делегата: WindowUid - {WindowUid}, KeyNetwork - {KeyNetwork}");
         NetworkActions.RemoveAll(x => x.UniqueDelegateName == UniqueDelegateName && x.KeyNetwork == KeyNetwork);
         NetworkActions.Add(new MNetworkAction(WindowUid, Delegate, Dispatcher, KeyNetwork, UniqueDelegateName, NotSingle));
     }
 }
示例#3
0
 public MNetworkAction(NetworkDelegateTemplate DataDelegate, string KeyNetwork = null, int WindowUid = -1)
 {
     this.WindowUid    = WindowUid;
     this.KeyNetwork   = KeyNetwork;
     this.DataDelegate = DataDelegate;
 }
示例#4
0
        public static void Add(NetworkDelegateTemplate Delegate, string KeyNetwork = null, int WindowUid = -1)
        {
            Debug.Log($"Регистрация делегата: WindowUid - {WindowUid}, KeyNetwork - {KeyNetwork}");

            NetworkActions.Add(new MNetworkAction(Delegate, KeyNetwork, WindowUid));
        }