Пример #1
0
 protected override object GetValue(string key)
 {
     if (PropertyInfos.ContainsKey(key.ToLower()))
     {
         return(PropertyInfos[key.ToLower()].GetValue(ObjectWithLazyProperty, null));
     }
     return(base.GetValue(key));
 }
Пример #2
0
            public override bool Contains(object key)
            {
                var dicKey = key.ToString().ToLower();

                if (PropertyInfos.ContainsKey(dicKey))
                {
                    return(true);
                }
                return(base.Contains(key));
            }
Пример #3
0
            public static void Postfix(ViewModel __instance)
            {
                DebugLogger.Print("Created: {0}", __instance.GetType().Name);

                // Check if property exists in DialogHolders
                if (!PropertyInfos.ContainsKey(__instance.GetType()))
                {
                    return;
                }

                PropertyInfos[__instance.GetType()].SetValue(null, __instance);
            }