Ejemplo n.º 1
0
        public static void add_Message(Connection that, Action<MessageEvent> value)
        {
            if (!MessageFixup.ContainsKey(value))
                MessageFixup[value] = i => value(MessageEvent.CloneFrom(i));

            CommonExtensions.CombineDelegate(that, MessageFixup[value], MessageEvent.MESSAGE);
        }
Ejemplo n.º 2
0
 public static void remove_Message(Connection that, Action<MessageEvent> value)
 {
     if (MessageFixup.ContainsKey(value))
     {
         CommonExtensions.RemoveDelegate(that, MessageFixup[value], MessageEvent.MESSAGE);
         MessageFixup.Remove(value);
     }
 }
Ejemplo n.º 3
0
		public static void SendMessage(Connection c, SharedClass1.Messages m, params object[] e)
		{
			var i = new Message(((int)m).ToString());

			foreach (var z in e)
			{
				i.Add(z);
			}

			c.Send(i);
		}
Ejemplo n.º 4
0
		public static void remove_MessageDirect(Connection that, Action<object> value)
		{
			CommonExtensions.RemoveDelegate(that, value, MessageEvent.MESSAGE);
		}
Ejemplo n.º 5
0
 public static void remove_Init(Connection that, Action<object> value)
 {
     CommonExtensions.RemoveDelegate(that, value, ConnectionEvent.INIT);
 }
Ejemplo n.º 6
0
 public static void add_Init(Connection that, Action<object> value)
 {
     CommonExtensions.CombineDelegate(that, value, ConnectionEvent.INIT);
 }
Ejemplo n.º 7
0
 public static void remove_Disconnect(Connection that, Action<object> value)
 {
     CommonExtensions.RemoveDelegate(that, value, ConnectionEvent.DISCONNECT);
 }