Private
Public Access
Added many needed readonly keywords
This commit is contained in:
1 parent
e10f2b3d07
commit
3a9d92477b
8 files changed
+15
-15
No files matched your search
+1
-1
@@ -9,7 +9,7 @@ namespace Advanced_Software_Engineering_Tests {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[TestClass]
|
[TestClass]
|
||||||
internal class ValueHelperTester {
|
internal class ValueHelperTester {
|
||||||
private Random rand = new Random();
|
private readonly Random rand = new Random();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Random <see cref="ValueHelper.ConvertToInt(string)"/> test.
|
/// Random <see cref="ValueHelper.ConvertToInt(string)"/> test.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Advanced_Software_Engineering {
|
|||||||
public class Commander {
|
public class Commander {
|
||||||
private Graphics graphics;
|
private Graphics graphics;
|
||||||
private List<IVerb> commands = new List<IVerb>();
|
private List<IVerb> commands = new List<IVerb>();
|
||||||
private Drawer drawer;
|
private readonly Drawer drawer;
|
||||||
private bool commands_ok = true;
|
private bool commands_ok = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
/// Circle IVerb class.
|
/// Circle IVerb class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Circle : IVerb {
|
public class Circle : IVerb {
|
||||||
private Drawer drawer;
|
private readonly Drawer drawer;
|
||||||
private double scale;
|
private double scale;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
/// The Dot IVerb class
|
/// The Dot IVerb class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Dot : IVerb {
|
public class Dot : IVerb {
|
||||||
private Drawer drawer;
|
private readonly Drawer drawer;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the Dot IVerb
|
/// Creates the Dot IVerb
|
||||||
|
|||||||
+3
-3
@@ -6,10 +6,10 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
|
|||||||
/// DrawLines IVerb class
|
/// DrawLines IVerb class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DrawLines : IVerb {
|
public class DrawLines : IVerb {
|
||||||
private Drawer drawer;
|
private readonly Drawer drawer;
|
||||||
private Point[] points;
|
private readonly Point[] points;
|
||||||
|
|
||||||
private bool descCreated = false;
|
private readonly bool descCreated = false;
|
||||||
private string desc;
|
private string desc;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+2
-2
@@ -6,8 +6,8 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
|
|||||||
/// DrawTo IVerb class
|
/// DrawTo IVerb class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DrawTo : IVerb {
|
public class DrawTo : IVerb {
|
||||||
private Drawer drawer;
|
private readonly Drawer drawer;
|
||||||
private Point moveToPoint;
|
private readonly Point moveToPoint;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the DrawTo intstance
|
/// Creates the DrawTo intstance
|
||||||
|
|||||||
+5
-5
@@ -8,11 +8,11 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
|
|||||||
/// A class that generates a RegularPolygon IVerb.
|
/// A class that generates a RegularPolygon IVerb.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class RegularPolygon : IVerb {
|
public class RegularPolygon : IVerb {
|
||||||
private Drawer drawer;
|
private readonly Drawer drawer;
|
||||||
private int sides;
|
private readonly int sides;
|
||||||
private double scale;
|
private readonly double scale;
|
||||||
private double offset;
|
private readonly double offset;
|
||||||
private List<Point> points;
|
private readonly List<Point> points;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Draws a regular polygon.
|
/// Draws a regular polygon.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Advanced_Software_Engineering {
|
|||||||
/// The error window that can show errors, warnings and messages.
|
/// The error window that can show errors, warnings and messages.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ErrorWindow : Form {
|
public partial class ErrorWindow : Form {
|
||||||
private string desc;
|
private readonly string desc;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The error message type.
|
/// The error message type.
|
||||||
|
|||||||
Reference in new issue
Block a user