public static IEither <IEnumerable <ICommandError>, IEnumerable <IEvent> > Failed(ICommandError error) { return(Either.Create <IEnumerable <ICommandError>, IEnumerable <IEvent> >(error.ToEnumerable())); }
public static IEither <IEnumerable <ICommandError>, IEnumerable <IEvent> > Failed(ICommandError error) => CommandResult.Failed(new[] { error });