Skip to content

Commit 8cd9cf3

Browse files
committed
* Added more code documentation
* Improved code documentation * Minor code improvements * Changed version information * Optimized images
1 parent c1dd0f2 commit 8cd9cf3

22 files changed

Lines changed: 96 additions & 64 deletions

Advanced PortChecker/Classes/ExportWriter.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
namespace Advanced_PortChecker.Classes
77
{
88
/// <summary>
9-
/// A static helper class to export items to the disk.
9+
/// A static helper class to export items to the disk
1010
/// </summary>
1111
internal static class ExportWriter
1212
{
1313
/// <summary>
14-
/// Export the listview items in plain text format to the drive.
14+
/// Export the listview items in plain text format to the drive
1515
/// </summary>
16-
/// <param name="path">The path where the export list should be saved.</param>
17-
/// <param name="lvPorts">The listview control containing all the LvCheck items.</param>
16+
/// <param name="path">The path where the export list should be saved</param>
17+
/// <param name="lvPorts">The listview control containing all the LvCheck items</param>
1818
internal static void SaveAsText(string path, ItemsControl lvPorts)
1919
{
2020
if (lvPorts.Items.Count == 0) return;
@@ -48,10 +48,10 @@ internal static void SaveAsText(string path, ItemsControl lvPorts)
4848

4949
// ReSharper disable once InconsistentNaming
5050
/// <summary>
51-
/// Export the listview items in HTML format to the drive.
51+
/// Export the listview items in HTML format to the drive
5252
/// </summary>
53-
/// <param name="path">The path where the export list should be saved.</param>
54-
/// <param name="lvPorts">The listview control containing all the LvCheck items.</param>
53+
/// <param name="path">The path where the export list should be saved</param>
54+
/// <param name="lvPorts">The listview control containing all the LvCheck items</param>
5555
internal static void SaveAsHTML(string path, ItemsControl lvPorts)
5656
{
5757
if (lvPorts.Items.Count == 0) return;
@@ -90,10 +90,10 @@ internal static void SaveAsHTML(string path, ItemsControl lvPorts)
9090

9191
// ReSharper disable once InconsistentNaming
9292
/// <summary>
93-
/// Export the listview items in CSV format to the drive.
93+
/// Export the listview items in CSV format to the drive
9494
/// </summary>
95-
/// <param name="path">The path where the export list should be saved.</param>
96-
/// <param name="lvPorts">The listview control containing all the LvCheck items.</param>
95+
/// <param name="path">The path where the export list should be saved</param>
96+
/// <param name="lvPorts">The listview control containing all the LvCheck items</param>
9797
internal static void SaveAsCSV(string path, ItemsControl lvPorts)
9898
{
9999
try

Advanced PortChecker/Classes/OperationInformation.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33
namespace Advanced_PortChecker.Classes
44
{
55
/// <summary>
6-
/// Represents the content of a scan operation.
6+
/// Represents the content of a scan operation
77
/// </summary>
8-
internal class OperationInformation
8+
internal sealed class OperationInformation
99
{
10+
/// <summary>
11+
/// A boolean to indicate whether an operation was cancelled
12+
/// </summary>
1013
public bool IsCancelled { get; set; }
14+
/// <summary>
15+
/// A integer value indicating the current progress
16+
/// </summary>
1117
public IProgress<int> Progress { get; set; }
18+
/// <summary>
19+
/// The LvCheck item that is currently udergoing an operation
20+
/// </summary>
1221
public IProgress<LvCheck> ItemProgress { get; set; }
1322
}
1423
}

Advanced PortChecker/Classes/PortChecker.cs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
namespace Advanced_PortChecker.Classes
77
{
88
/// <summary>
9-
/// Static class to determine whether a certain port is open or not.
9+
/// Static class to determine whether a certain port is open or not
1010
/// </summary>
1111
internal static class PortChecker
1212
{
1313
// ReSharper disable once InconsistentNaming
1414
/// <summary>
15-
/// Determine which ports are open on a certain address using a TCP and UDP Client.
15+
/// Determine which ports are open on a certain address using a TCP and UDP Client
1616
/// </summary>
17-
/// <param name="address">The IP address that needs to be scanned.</param>
18-
/// <param name="startPort">The starting point of ports that needs to be scanned.</param>
19-
/// <param name="stopPort">The final port in a range of ports that needs to be scanned.</param>
20-
/// <param name="timeout">The amount of time before the operation cancels.</param>
21-
/// <param name="oi">The operation information regarding this scan.</param>
22-
/// <returns>A list of information regarding the ports and address that was scanned.</returns>
17+
/// <param name="address">The IP address that needs to be scanned</param>
18+
/// <param name="startPort">The starting point of ports that needs to be scanned</param>
19+
/// <param name="stopPort">The final port in a range of ports that needs to be scanned</param>
20+
/// <param name="timeout">The amount of time before the operation cancels</param>
21+
/// <param name="oi">The operation information regarding this scan</param>
22+
/// <returns>A list of information regarding the ports and address that was scanned</returns>
2323
internal static async Task<List<LvCheck>> CheckTCPUDP(string address, int startPort, int stopPort, int timeout, OperationInformation oi)
2424
{
2525
List<LvCheck> lv = new List<LvCheck>();
@@ -41,15 +41,15 @@ await Task.Run(() =>
4141

4242
// ReSharper disable once InconsistentNaming
4343
/// <summary>
44-
/// Determine which ports are open on a certain address using a TCP Client.
44+
/// Determine which ports are open on a certain address using a TCP Client
4545
/// </summary>
46-
/// <param name="address">The IP address that needs to be scanned.</param>
47-
/// <param name="startPort">The starting point of ports that needs to be scanned.</param>
48-
/// <param name="stopPort">The final port in a range of ports that needs to be scanned.</param>
49-
/// <param name="timeout">The amount of time before the operation cancels.</param>
50-
/// <param name="oi">The operation information regarding this scan.</param>
51-
/// <param name="reportProgress">A boolean to represent whether this method should report the current progress or not.</param>
52-
/// <returns>A list of information regarding the ports and address that was scanned.</returns>
46+
/// <param name="address">The IP address that needs to be scanned</param>
47+
/// <param name="startPort">The starting point of ports that needs to be scanned</param>
48+
/// <param name="stopPort">The final port in a range of ports that needs to be scanned</param>
49+
/// <param name="timeout">The amount of time before the operation cancels</param>
50+
/// <param name="oi">The operation information regarding this scan</param>
51+
/// <param name="reportProgress">A boolean to represent whether this method should report the current progress or not</param>
52+
/// <returns>A list of information regarding the ports and address that was scanned</returns>
5353
internal static async Task<List<LvCheck>> CheckTCP(string address, int startPort, int stopPort, int timeout, OperationInformation oi, bool reportProgress)
5454
{
5555
List<LvCheck> lv = new List<LvCheck>();
@@ -81,15 +81,15 @@ await Task.Run(() =>
8181

8282
// ReSharper disable once InconsistentNaming
8383
/// <summary>
84-
/// Determine which ports are open on a certain address using an UDP Client.
84+
/// Determine which ports are open on a certain address using an UDP Client
8585
/// </summary>
86-
/// <param name="address">The IP address that needs to be scanned.</param>
87-
/// <param name="startPort">The starting point of ports that needs to be scanned.</param>
88-
/// <param name="stopPort">The final port in a range of ports that needs to be scanned.</param>
89-
/// <param name="timeout">The amount of time before the operation cancels.</param>
90-
/// <param name="oi">The operation information regarding this scan.</param>
91-
/// <param name="reportProgress">A boolean to represent whether this method should report the current progress or not.</param>
92-
/// <returns>A list of information regarding the ports and address that was scanned.</returns>
86+
/// <param name="address">The IP address that needs to be scanned</param>
87+
/// <param name="startPort">The starting point of ports that needs to be scanned</param>
88+
/// <param name="stopPort">The final port in a range of ports that needs to be scanned</param>
89+
/// <param name="timeout">The amount of time before the operation cancels</param>
90+
/// <param name="oi">The operation information regarding this scan</param>
91+
/// <param name="reportProgress">A boolean to represent whether this method should report the current progress or not</param>
92+
/// <returns>A list of information regarding the ports and address that was scanned</returns>
9393
internal static async Task<List<LvCheck>> CheckUDP(string address, int startPort, int stopPort, int timeout, OperationInformation oi, bool reportProgress)
9494
{
9595
List<LvCheck> lv = new List<LvCheck>();
@@ -121,12 +121,12 @@ await Task.Run(() =>
121121

122122

123123
/// <summary>
124-
/// Determine whether a certain port is open or not on a certain address using a TCP Client.
124+
/// Determine whether a certain port is open or not on a certain address using a TCP Client
125125
/// </summary>
126-
/// <param name="address">The IP address that needs to be scanned.</param>
127-
/// <param name="port">The port that needs to be scanned.</param>
128-
/// <param name="timeout">The amount of time before the operation cancels.</param>
129-
/// <returns>Returns true if the port is open for connections.</returns>
126+
/// <param name="address">The IP address that needs to be scanned</param>
127+
/// <param name="port">The port that needs to be scanned</param>
128+
/// <param name="timeout">The amount of time before the operation cancels</param>
129+
/// <returns>Returns true if the port is open for connections</returns>
130130
private static bool IsTcpOpen(string address, int port, int timeout)
131131
{
132132
try
@@ -147,12 +147,12 @@ private static bool IsTcpOpen(string address, int port, int timeout)
147147
}
148148

149149
/// <summary>
150-
/// Determine whether a certain port is open or not on a certain address using a UDP Client.
150+
/// Determine whether a certain port is open or not on a certain address using a UDP Client
151151
/// </summary>
152-
/// <param name="address">The IP address that needs to be scanned.</param>
153-
/// <param name="port">The port that needs to be scanned.</param>
154-
/// <param name="timeout">The amount of time before the operation cancels.</param>
155-
/// <returns>Returns true if the port is open for connections.</returns>
152+
/// <param name="address">The IP address that needs to be scanned</param>
153+
/// <param name="port">The port that needs to be scanned</param>
154+
/// <param name="timeout">The amount of time before the operation cancels</param>
155+
/// <returns>Returns true if the port is open for connections</returns>
156156
private static bool IsUdpOpen(string address, int port, int timeout)
157157
{
158158
try

Advanced PortChecker/Classes/StyleManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
namespace Advanced_PortChecker.Classes
77
{
88
/// <summary>
9-
/// Static class to change the style of an object.
9+
/// Static class to change the style of an object
1010
/// </summary>
1111
internal static class StyleManager
1212
{
1313
/// <summary>
14-
/// Change the visual style of an object.
14+
/// Change the visual style of an object
1515
/// </summary>
16-
/// <param name="o">The object that needs to have a style overhaul.</param>
16+
/// <param name="o">The object that needs to have a style overhaul</param>
1717
internal static void ChangeStyle(DependencyObject o)
1818
{
1919
try

Advanced PortChecker/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[assembly: AssemblyConfiguration("")]
1313
[assembly: AssemblyCompany("CodeDead")]
1414
[assembly: AssemblyProduct("Advanced PortChecker")]
15-
[assembly: AssemblyCopyright("Copyright © CodeDead 2017")]
15+
[assembly: AssemblyCopyright("Copyright © CodeDead 2018")]
1616
[assembly: AssemblyTrademark("")]
1717
[assembly: AssemblyCulture("")]
1818

@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.2.0.0")]
55-
[assembly: AssemblyFileVersion("1.2.0.0")]
54+
[assembly: AssemblyVersion("1.3.0.0")]
55+
[assembly: AssemblyFileVersion("1.3.0.0")]
-106 Bytes
Loading
-103 Bytes
Loading
-115 Bytes
Loading
-101 Bytes
Loading
-132 Bytes
Loading

0 commit comments

Comments
 (0)