|
10 | 10 |
|
11 | 11 | namespace nanoFramework.Tools.Debugger |
12 | 12 | { |
| 13 | + // write intellisense documentation for this class |
13 | 14 | public abstract partial class PortBase : PortMessageBase |
14 | 15 | { |
| 16 | + |
| 17 | + #region creating serial instances |
| 18 | + |
15 | 19 | public static PortBase CreateInstanceForSerial() |
16 | 20 | { |
17 | 21 | return new PortSerialManager(true, null); |
18 | 22 | } |
19 | 23 |
|
20 | 24 | public static PortBase CreateInstanceForSerial(List<string> portExclusionList) |
21 | 25 | { |
22 | | - return new PortSerialManager(true, portExclusionList); |
| 26 | + return new PortSerialManager( |
| 27 | + true, |
| 28 | + portExclusionList); |
| 29 | + } |
| 30 | + public static PortBase CreateInstanceForSerial(bool startDeviceWatchers) |
| 31 | + { |
| 32 | + return new PortSerialManager( |
| 33 | + startDeviceWatchers, |
| 34 | + null); |
23 | 35 | } |
24 | 36 |
|
25 | | - public static PortBase CreateInstanceForSerial(bool startDeviceWatchers, int bootTime = 1000) |
| 37 | + public static PortBase CreateInstanceForSerial( |
| 38 | + bool startDeviceWatchers, |
| 39 | + int bootTime = 1000) |
26 | 40 | { |
27 | | - return new PortSerialManager(startDeviceWatchers, null, bootTime); |
| 41 | + return new PortSerialManager( |
| 42 | + startDeviceWatchers, |
| 43 | + null, |
| 44 | + bootTime); |
28 | 45 | } |
29 | 46 |
|
30 | | - public static PortBase CreateInstanceForSerial(bool startDeviceWatchers, List<string> portExclusionList = null, int bootTime = 1000) |
| 47 | + public static PortBase CreateInstanceForSerial( |
| 48 | + bool startDeviceWatchers, |
| 49 | + List<string> portExclusionList = null, |
| 50 | + int bootTime = 1000) |
31 | 51 | { |
32 | | - return new PortSerialManager(startDeviceWatchers, portExclusionList, bootTime); |
| 52 | + return new PortSerialManager( |
| 53 | + startDeviceWatchers, |
| 54 | + portExclusionList, |
| 55 | + bootTime); |
33 | 56 | } |
34 | 57 |
|
| 58 | + #endregion |
| 59 | + |
| 60 | + #region creating tcp/ip instances |
| 61 | + |
35 | 62 | public static PortBase CreateInstanceForNetwork(bool startDeviceWatchers) |
36 | 63 | { |
37 | 64 | return new PortTcpIpManager(startDeviceWatchers); |
38 | 65 | } |
39 | 66 |
|
40 | | - public static PortBase CreateInstanceForNetwork(bool startDeviceWatchers, int discoveryPort) |
| 67 | + public static PortBase CreateInstanceForNetwork( |
| 68 | + bool startDeviceWatchers, |
| 69 | + int discoveryPort) |
41 | 70 | { |
42 | | - return new PortTcpIpManager(startDeviceWatchers, discoveryPort); |
| 71 | + return new PortTcpIpManager( |
| 72 | + startDeviceWatchers, |
| 73 | + discoveryPort); |
43 | 74 | } |
44 | 75 |
|
45 | | - public static PortBase CreateInstanceForComposite(IEnumerable<PortBase> ports, bool startDeviceWatchers) |
| 76 | + #endregion |
| 77 | + |
| 78 | + public static PortBase CreateInstanceForComposite( |
| 79 | + IEnumerable<PortBase> ports, |
| 80 | + bool startDeviceWatchers) |
46 | 81 | { |
47 | | - return new PortCompositeDeviceManager(ports, startDeviceWatchers); |
| 82 | + return new PortCompositeDeviceManager( |
| 83 | + ports, |
| 84 | + startDeviceWatchers); |
48 | 85 | } |
49 | 86 | } |
50 | 87 | } |
0 commit comments