예제 #1
0
        public WirePropertyChangedListener(ViewModelBase target)
        {
            Target = target;
            var type = target.GetType();

            WireInfo = WirePropertyChangedInfo.GetCacheFor(type);

            Target.PropertyChanged += Target_PropertyChanged;
            ReconnectNested();
        }
예제 #2
0
 /// <summary>
 /// 指定した型に対する依存関係を取得
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static WirePropertyChangedInfo GetCacheFor(Type type)
 {
     if (!WirePropertyChangedInfo.WirePropertyChangedCache.ContainsKey(type))
     {
         var cache = new WirePropertyChangedInfo();
         cache.MakeCacheFor(type);
         WirePropertyChangedCache[type] = cache;
     }
     return(WirePropertyChangedCache[type]);
 }