IsMatch() public méthode

public IsMatch ( string value ) : bool
value string
Résultat bool
Exemple #1
0
 private bool MatchRelatedType(LogMessage log)
 {
     if (RelatedType.IsMatch(log.TypeName))
     {
         return(true);
     }
     foreach (var item in log.RelatedTypes)
     {
         if (RelatedType.IsMatch(item))
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #2
0
 public bool IsMatch(LogMessage log)
 {
     if (TimeFilter != null)
     {
         if (!TimeFilter.IsMatch(log.UtcTime))
         {
             return(false);
         }
     }
     if (Classification != null)
     {
         if (!Classification.IsMatch(1 << (int)log.Classification))
         {
             return(false);
         }
     }
     if (Level != null)
     {
         if (!Level.IsMatch(1 << (int)log.Level))
         {
             return(false);
         }
     }
     if (Flags != null)
     {
         if (!Flags.IsMatch((int)log.Flags))
         {
             return(false);
         }
     }
     if (Assembly != null)
     {
         if (!Assembly.IsMatch(log.AssemblyName))
         {
             return(false);
         }
     }
     if (Type != null)
     {
         if (!Type.IsMatch(log.TypeName))
         {
             return(false);
         }
     }
     if (RelatedType != null)
     {
         if (!MatchRelatedType(log))
         {
             return(false);
         }
     }
     if (StackDetails != null)
     {
         if (!StackDetails.IsMatch(log))
         {
             return(false);
         }
     }
     if (StackTraceDetails != null)
     {
         if (!StackTraceDetails.IsMatch(log))
         {
             return(false);
         }
     }
     if (EventName != null)
     {
         if (!EventName.IsMatch(log.EventName))
         {
             return(false);
         }
     }
     if (MessageText != null)
     {
         if (!MessageText.IsMatch(log.Message))
         {
             return(false);
         }
     }
     if (DetailsText != null)
     {
         if (!DetailsText.IsMatch(log.Details))
         {
             return(false);
         }
     }
     if (ExceptionText != null)
     {
         if (!ExceptionText.IsMatch(log.ExceptionString))
         {
             return(false);
         }
     }
     return(true);
 }