public void AddCallbackToKey(string key, FoundStringEventHandler value)
		{
			if (dictionaryOfCallbacks.ContainsKey(key))
			{
				dictionaryOfCallbacks[key] += value;
			}
			else
			{
				dictionaryOfCallbacks.Add(key, value);
			}
		}
Exemple #2
0
 public void AddCallBackToKey(string key, FoundStringEventHandler value)
 {
     if (dictionaryOfCallBacks.ContainsKey(key))
     {
         dictionaryOfCallBacks[key] += value;
     }
     else
     {
         dictionaryOfCallBacks.Add(key, value);
     }
 }
		public void RemoveCallbackFromKey(string key, FoundStringEventHandler value)
		{
			if (dictionaryOfCallbacks.ContainsKey(key))
			{
				if (dictionaryOfCallbacks[key] == null)
				{
					throw new Exception();
				}
				dictionaryOfCallbacks[key] -= value;
				if (dictionaryOfCallbacks[key] == null)
				{
					dictionaryOfCallbacks.Remove(key);
				}
			}
			else
			{
				throw new Exception();
			}
		}
Exemple #4
0
 public void RemoveCallBackFromKey(string key, FoundStringEventHandler value)
 {
     if (dictionaryOfCallBacks.ContainsKey(key))
     {
         if (dictionaryOfCallBacks[key] == null)
         {
             throw new Exception();
         }
         dictionaryOfCallBacks[key] -= value;
         if (dictionaryOfCallBacks[key] == null)
         {
             dictionaryOfCallBacks.Remove(key);
         }
     }
     else
     {
         throw new Exception();
     }
 }