public string Format(IStepNameDecorator decorator) { var builder = new StringBuilder(); if (!string.IsNullOrWhiteSpace(StepTypeName)) builder.Append(decorator.DecorateStepTypeName(StepTypeName)).Append(" "); builder.AppendFormat(decorator.DecorateNameFormat(NameFormat), Parameters.Select(decorator.DecorateParameterValue).Cast<object>().ToArray()); return builder.ToString(); }
public string Format(IStepNameDecorator decorator) { var builder = new StringBuilder(); if (!string.IsNullOrWhiteSpace(StepTypeName)) { builder.Append(decorator.DecorateStepTypeName(StepTypeName)).Append(" "); } builder.AppendFormat(decorator.DecorateNameFormat(NameFormat), Parameters.Select(decorator.DecorateParameterValue).Cast <object>().ToArray()); return(builder.ToString()); }
//TODO: rework to make it testing real code public string Format(IStepNameDecorator decorator) { return(StepTypeName != null ? $"{decorator.DecorateStepTypeName(StepTypeName)} {Format((INameDecorator)decorator)}" : Format((INameDecorator)decorator)); }
public string Format(IStepNameDecorator decorator) { return((StepTypeName != null) ? string.Format("{0} {1}", decorator.DecorateStepTypeName(StepTypeName), base.Format(decorator)) : base.ToString()); }