Exemplo n.º 1
0
 /// <summary>
 /// Adds a helper to the KVO system. Helpers "assist" classes with automatic
 /// KVO notifications.
 /// </summary>
 /// <param name="helper">The helper to add.</param>
 /// <param name="targetType">The type the helper is for.</param>
 public void RegisterHelperForType(KNKVOHelper helper, Type targetType)
 {
     helpers[targetType] = helper;
 }
Exemplo n.º 2
0
 public void HelperIsNoLongerNeeded(KNKVOHelper helper)
 {
     helper.Release();
     if (helper.RetainCount() <= 0 && helperCache.ContainsValue(helper)) {
         helperCache.Remove(helper);
     }
 }