Exemple #1
0
 public static IEnumerable <IAdditionalOperation> Filter(LogEventContext context, Type flagType, AdditionalOperationTypes optType)
 {
     if (context == null)
     {
         return(ReturnEmptyAdditionalOperations());
     }
     if (flagType == null)
     {
         return(ReturnEmptyAdditionalOperations());
     }
     return(FilterAfterChecking(context.ExposeOpts(), flagType, optType));
 }
Exemple #2
0
 private static IEnumerable <IAdditionalOperation> FilterAfterChecking(IEnumerable <IAdditionalOperation> opts, Type flagType, AdditionalOperationTypes optType)
 {
     return(opts.Where(x => x.Flag == flagType && x.Type == optType).ToImmutableList());
 }