예제 #1
0
 private static string GetFormatedText(SystemQueue target, string [] textField, string textFormatString)
 {
     for (int i = 0; i < textField.Length; i++)
     {
         PropertyInfo pi = target.GetType().GetProperty(textField[i]);
         textFormatString = textFormatString.Replace("{" + i.ToString() + "}", pi != null ? pi.GetValue(target, null).ToString() : string.Empty);
     }
     return(textFormatString);
 }
예제 #2
0
        private static bool IgnorThis(SystemQueue target, string parentFilter)
        {
            bool result = true;

            parentFilter = parentFilter.Replace(" ", "");                       // remove spaces
            parentFilter = parentFilter.Replace("'", "");                       // remove '
            string [] parsed = parentFilter.Split('=');                         // parse

            PropertyInfo pi          = target.GetType().GetProperty(parsed[0]);
            string       filterField = (string)pi.GetValue(target, null);

            if (filterField.ToLower() == parsed[1].ToLower())
            {
                result = false;
            }
            return(result);
        }