Exemple #1
0
 public static QueryServiceLinkField FromValue(string value)
 {
     foreach (QueryServiceLinkField serviceLinkField in QueryServiceLinkField.Values())
     {
         if (serviceLinkField.Value().Equals(value))
         {
             return(serviceLinkField);
         }
     }
     throw new ArgumentException(value.ToString());
 }
Exemple #2
0
        public static List <QueryServiceLinkField> Values()
        {
            QueryServiceLinkField        serviceLinkField     = new QueryServiceLinkField();
            List <QueryServiceLinkField> serviceLinkFieldList = new List <QueryServiceLinkField>();

            foreach (FieldInfo field in serviceLinkField.GetType().GetFields())
            {
                serviceLinkFieldList.Add((QueryServiceLinkField)field.GetValue((object)serviceLinkField));
            }
            return(serviceLinkFieldList);
        }