public DelimitedStringableListDecoration(IStringableList decorated, string prefix, string delim, string suffix) : base(decorated) { this.Prefix = prefix; this.Delimiter = delim; this.Suffix = suffix; }
public static void LogTestResults(List <TestOfResult> results, string path) { if (results == null) { return; } if (results.Count == 0) { return; } //get something we can write to var list = NaturalStringableList.New().Fileable().Filing(path); IStringableList iList = list.As <IStringableList>(false); foreach (var each in results) { var s = each.Stringable(); //cos we've changed our decorated type from stringablelist to stringable we have to grab the list decoration var eVal = s.GetValue(); iList.Add(eVal); } list.Write(); }
public override IDecorationOf<IStringableList> ApplyThisDecorationTo(IStringableList thing) { return new DelimitedStringableListDecoration(thing, this.Prefix, this.Delimiter, this.Suffix); }
public LengthListDecoration(IStringableList decorated) : base(decorated) { }
public static LengthListDecoration DecorateListWithLength(this IStringableList thing) { Condition.Requires(thing).IsNotNull(); return(new LengthListDecoration(thing)); }
public override IDecorationOf <IStringableList> ApplyThisDecorationTo(IStringableList thing) { return(new LengthListDecoration(thing)); }
public static DelimitedStringableListDecoration Delimit(this IStringableList thing, string prefix, string delim, string suffix) { Condition.Requires(thing).IsNotNull(); return(new DelimitedStringableListDecoration(thing, prefix, delim, suffix)); }
public override IDecorationOf <IStringableList> ApplyThisDecorationTo(IStringableList thing) { return(new DelimitedStringableListDecoration(thing, this.Prefix, this.Delimiter, this.Suffix)); }
public override IDecorationOf<IStringableList> ApplyThisDecorationTo(IStringableList thing) { return new LengthListDecoration(thing); }