| 1 |
figdor32 |
2 |
using System; |
| 2 |
|
|
using System.Collections.Generic; |
| 3 |
|
|
using System.Linq; |
| 4 |
|
|
using System.Text; |
| 5 |
|
|
using System.Threading.Tasks; |
| 6 |
|
|
|
| 7 |
|
|
namespace TELTest { |
| 8 |
|
|
public struct ReadConfiguration { |
| 9 |
|
|
public bool Echo { get; set; } |
| 10 |
|
|
public bool EchoPasswordChars { get; set; } |
| 11 |
|
|
public char PasswordChar { get; set; } |
| 12 |
|
|
public bool FlushAfterReading { get; set; } |
| 13 |
|
|
public string Whitelist { get; set; } |
| 14 |
|
|
public char Terminator { get; set; } |
| 15 |
|
|
public int MaxLength { get; set; } |
| 16 |
|
|
public static ReadConfiguration Default { |
| 17 |
|
|
get { |
| 18 |
|
|
ReadConfiguration rc = new ReadConfiguration(); |
| 19 |
|
|
rc.Echo = true; |
| 20 |
|
|
rc.EchoPasswordChars = false; |
| 21 |
|
|
rc.PasswordChar = '*'; |
| 22 |
|
|
rc.FlushAfterReading = true; |
| 23 |
|
|
rc.Whitelist = null; |
| 24 |
|
|
rc.MaxLength = int.MaxValue; |
| 25 |
|
|
rc.Terminator = '\r'; |
| 26 |
|
|
return rc; |
| 27 |
|
|
} |
| 28 |
|
|
} |
| 29 |
|
|
} |
| 30 |
|
|
} |