public static void DoAfter(this ICommandAspect aspect, ILogger logger, object parameter) { try { aspect?.After(parameter); } catch (Exception ex) { logger?.Warning(ex); } }
public void With(ICommandAspect aspect) { if (_aspect == null) { _aspect = aspect; } else { _aspect.With(aspect); } }
/// <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); }