protected override object GetValue(string key) { if (PropertyInfos.ContainsKey(key.ToLower())) { return(PropertyInfos[key.ToLower()].GetValue(ObjectWithLazyProperty, null)); } return(base.GetValue(key)); }
public override bool Contains(object key) { var dicKey = key.ToString().ToLower(); if (PropertyInfos.ContainsKey(dicKey)) { return(true); } return(base.Contains(key)); }
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); }