public override void RecursivelyResolve(Dictionary <string, DataDefinition> local, Dictionary <string, DataDefinition> global, Dictionary <string, Dictionary <string, DataDefinition> > referenceableDefinitions) { if (Key != null) { var key = Key.ToLower(); Dictionary <string, DataDefinition> defs = null; if (local.ContainsKey(key)) { defs = local; } else if (global.ContainsKey(key)) { defs = global; } if (defs != null) { var def = defs[key] as EnumDefinition; EnumValues = def.EnumValues; if (!EnumValues.Contains(Default)) { Default = EnumValues[0]; } } else { Message.Show("Failed to find key " + Key + "!", "Reference Resolve Failed", "Ok"); } } }
protected override void DoRecursivelyResolve(Dictionary <string, DataDefinition> local, Dictionary <string, DataDefinition> global, Dictionary <string, Dictionary <string, DataDefinition> > referenceableDefinitions) { if (Key != null) { var key = Key.ToLower(); Dictionary <string, DataDefinition> defs = null; if (local.ContainsKey(key)) { defs = local; } else if (global.ContainsKey(key)) { defs = global; } if (defs != null) { var def = defs[key] as EnumDefinition; EnumValues = def.EnumValues; if (!EnumValues.Contains(Default)) { Default = EnumValues[0]; } } else { throw new Exception("Failed to find key " + Key + "!"); } } }