public virtual string GetText(ModifiersCollection modifiers) { if (modifiers.Contains(Modifier.Old)) { return(m_field.GetAtributeValue("Old")); } else if (modifiers.Contains(Modifier.New)) { return(m_field.GetAtributeValue("New")); } else { return(m_field.GetAtributeValue("New") ?? m_field.GetAtributeValue("Old")); } }
public override string GetText(ModifiersCollection modifiers) { if (modifiers.Contains(Modifier.Old)) { return(m_field.GetAtributeValue("LookupOldF")); } else if (modifiers.Contains(Modifier.New)) { return(m_field.GetAtributeValue("LookupNewF")); } else { return(m_field.GetAtributeValue("LookupNewF") ?? m_field.GetAtributeValue("LookupOldF")); } }
public static ModifiersCollection Parse(string modifiers) { var res = new ModifiersCollection(); if (string.IsNullOrEmpty(modifiers)) { return(ModifiersCollection.Empty); } foreach (var s in modifiers.Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries)) { var m = Modifier.AllModifiers.Where(p => p.Pattern != null && p.Pattern.Trim(':') == s).FirstOrDefault(); if (m != null && !res.Contains(m)) { res.Add(m); } } return(res); }