Exemple #1
0
 /// <summary>
 /// Removes an event handler for a specific address.
 /// </summary>
 public void RemoveListener(string address, OscMessageEventHandler e)
 {
     lock (_filteredHandlers)
     {
         List <OscMessageEventHandler> handlers;
         if (_filteredHandlers.TryGetValue(address.ToLower(), out handlers))
         {
             handlers.Remove(e);
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Adds an event handler for a specific address.
 /// </summary>
 public void AddListener(string address, OscMessageEventHandler e)
 {
     lock (_filteredHandlers)
     {
         List <OscMessageEventHandler> handlers;
         if (_filteredHandlers.TryGetValue(address.ToLower(), out handlers) == false)
         {
             handlers = new List <OscMessageEventHandler>();
             _filteredHandlers.Add(address.ToLower(), handlers);
         }
         handlers.Add(e);
     }
 }