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