public static IFormatter Append <T>(this IStore <IConditional <object, IFormattable> > @this, ISelectFormatter <T> parameter) { var formatter = new Formatter <T>(Compose.Start.A.Selection.Of.Any.AndOf <T>() .By.Cast.Or.Throw.Select(new Formatters <T>(parameter))); var result = new Formatter(@this.Get().Unless(formatter)); @this.Execute(result); return(result); }
public Formatters(ISelectFormatter <T> parameter) : base((instance, formatter) => new Adapter <T>(instance, formatter.Get), parameter) { }
public static IFormatter Register <T>(this ISelectFormatter <T> @this) => FormatterRegistration.Default.Append(@this);
public static IFormatter Append <T>(this IConditional <object, IFormattable> @this, ISelectFormatter <T> parameter) { var formatter = new Formatter <T>(Compose.Start.A.Selection.Of.Any.AndOf <T>() .By.Cast.Or.Throw.Select(new Formatters <T>(parameter)) .Get()); var result = new Formatter(@this.Then().Unless.Input.IsOf <T>().ThenUse(A.Selection(formatter)).Get()); return(result); }