Beispiel #1
0
 private static string GetFormatedText(SystemHHTLog 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);
 }
Beispiel #2
0
        private static bool IgnorThis(SystemHHTLog 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);
        }