示例#1
0
文件: Input.cs 项目: enrique-thedy/bz
        protected override void FinishTemplate(FormRenderer formRenderer, T result)
        {
            formRenderer.WriteFinishMessage(_message);

            if (result != null)
            {
                formRenderer.Write(result.ToString(), Prompt.ColorSchema.Answer);
            }
        }
示例#2
0
 protected override void FinishTemplate(FormRenderer formRenderer, IEnumerable <T> result)
 {
     formRenderer.WriteFinishMessage(_message);
     formRenderer.Write(result.Select(_valueSelector).Join(", "), Prompt.ColorSchema.Answer);
 }
示例#3
0
 protected override void FinishTemplate(FormRenderer formRenderer, string result)
 {
     formRenderer.WriteFinishMessage(_message);
     formRenderer.Write(new string('*', _inputBuffer.Length), Prompt.ColorSchema.Answer);
 }
示例#4
0
 protected override void FinishTemplate(FormRenderer formRenderer, bool result)
 {
     formRenderer.WriteFinishMessage(_message);
     formRenderer.Write(result ? "Yes" : "No", Prompt.ColorSchema.Answer);
 }
示例#5
0
 protected override void FinishTemplate(FormRenderer formRenderer, T result)
 {
     formRenderer.WriteFinishMessage(_message);
     formRenderer.Write(_valueSelector(result), Prompt.ColorSchema.Answer);
 }