示例#1
0
 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"));
     }
 }
示例#2
0
 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"));
     }
 }
示例#3
0
        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);
        }