Exemple #1
0
 public static void DoAfter(this ICommandAspect aspect, ILogger logger, object parameter)
 {
     try
     {
         aspect?.After(parameter);
     }
     catch (Exception ex)
     {
         logger?.Warning(ex);
     }
 }
Exemple #2
0
 public void With(ICommandAspect aspect)
 {
     if (_aspect == null)
     {
         _aspect = aspect;
     }
     else
     {
         _aspect.With(aspect);
     }
 }
Exemple #3
0
 /// <summary>
 /// Withes the specified aspect.
 /// </summary>
 /// <param name="aspect">The aspect.</param>
 public ICommandAspect With(ICommandAspect aspect)
 {
     if (_next == null)
     {
         _next = aspect;
     }
     else
     {
         _next.With(aspect);
     }
     return(this);
 }