Added more readonly kewords

This commit is contained in:
Lukasz Baldyga committed 2020-11-15 05:47:13 +00:00
1 parent 3a9d92477b
commit 33c20bdaf6
13 files changed
+21 -21

No files matched your search

@@ -12,7 +12,7 @@ namespace Advanced_Software_Engineering_Tests {
/// </summary> /// </summary>
[TestClass] [TestClass]
public class CommandTester { public class CommandTester {
private Random rand = new Random(); private readonly Random rand = new Random();
/// <summary> /// <summary>
/// Automatically tests: /// Automatically tests:
@@ -11,8 +11,8 @@ namespace Advanced_Software_Engineering_Tests {
/// </summary> /// </summary>
[TestClass] [TestClass]
public class SettingsAndHelperFunctionsTester { public class SettingsAndHelperFunctionsTester {
private string alphabet = "abcdefghijklmnopqrstuvwxzy"; private readonly string alphabet = "abcdefghijklmnopqrstuvwxzy";
private Random rand = new Random(); private readonly Random rand = new Random();
/// <summary> /// <summary>
/// Random strip spaces test /// Random strip spaces test
@@ -5,7 +5,7 @@
/// </summary> /// </summary>
public class Circle : IVerb { public class Circle : IVerb {
private readonly Drawer drawer; private readonly Drawer drawer;
private double scale; private readonly double scale;
/// <summary> /// <summary>
/// Circle constructor creates the Circle IVerb. /// Circle constructor creates the Circle IVerb.
@@ -4,7 +4,7 @@
/// The Clear IVerb class. /// The Clear IVerb class.
/// </summary> /// </summary>
public class Clear : IVerb { public class Clear : IVerb {
private Drawer drawer; private readonly Drawer drawer;
/// <summary> /// <summary>
/// Create the clear IVerb /// Create the clear IVerb
@@ -4,8 +4,8 @@
/// Fill IVerb class /// Fill IVerb class
/// </summary> /// </summary>
public class Fill : IVerb { public class Fill : IVerb {
private Drawer drawer; private readonly Drawer drawer;
private bool enable; private readonly bool enable;
/// <summary> /// <summary>
/// Fill enables or disables the fill insider drawer /// Fill enables or disables the fill insider drawer
@@ -6,8 +6,8 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// The FillColor IVerb class /// The FillColor IVerb class
/// </summary> /// </summary>
public class FillColor : IVerb { public class FillColor : IVerb {
private Drawer drawer; private readonly Drawer drawer;
private Color color; private readonly Color color;
/// <summary> /// <summary>
/// Create the FillColor instance /// Create the FillColor instance
@@ -6,8 +6,8 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// MoveTo IVerb class /// MoveTo IVerb class
/// </summary> /// </summary>
public class MoveTo : IVerb { public class MoveTo : IVerb {
private Drawer drawer; private readonly Drawer drawer;
private Point moveToPoint; private readonly Point moveToPoint;
/// <summary> /// <summary>
/// Creates a MoveTo instance /// Creates a MoveTo instance
@@ -6,8 +6,8 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// The PenColor IVerb class /// The PenColor IVerb class
/// </summary> /// </summary>
public class PenColor : IVerb { public class PenColor : IVerb {
private Drawer drawer; private readonly Drawer drawer;
private Color color; private readonly Color color;
/// <summary> /// <summary>
/// Creates a PenColor instance /// Creates a PenColor instance
@@ -6,7 +6,7 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// The Quadrilateral IVerb class /// The Quadrilateral IVerb class
/// </summary> /// </summary>
public class Quadrilateral : IVerb { public class Quadrilateral : IVerb {
private IVerb IVerb; private readonly IVerb IVerb;
/// <summary> /// <summary>
/// Creates a Quadrilateral instances /// Creates a Quadrilateral instances
@@ -11,11 +11,11 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// Correct /// Correct
/// </todo> /// </todo>
public class Rectangle : IVerb { public class Rectangle : IVerb {
private Drawer drawer; private readonly Drawer drawer;
private PointF[] points; private readonly PointF[] points;
private double width; private readonly double width;
private double height; private readonly double height;
/// <summary> /// <summary>
/// Create a rectangle instance. Makes sure that /// Create a rectangle instance. Makes sure that
@@ -4,7 +4,7 @@
/// Setsets the pen to the initial position. /// Setsets the pen to the initial position.
/// </summary> /// </summary>
public class ResetPen : IVerb { public class ResetPen : IVerb {
private Drawer drawer; private readonly Drawer drawer;
/// <summary> /// <summary>
/// Creates the ResetPen IVerb /// Creates the ResetPen IVerb
@@ -4,7 +4,7 @@
/// The Square IVerb class /// The Square IVerb class
/// </summary> /// </summary>
public class Square : IVerb { public class Square : IVerb {
private IVerb IVerb; private readonly IVerb IVerb;
/// <summary> /// <summary>
/// A new Squre instance. Draws squares using <see cref="RegularPolygon"/> /// A new Squre instance. Draws squares using <see cref="RegularPolygon"/>
@@ -6,7 +6,7 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// The Triangle IVerb class /// The Triangle IVerb class
/// </summary> /// </summary>
public class Triangle : IVerb { public class Triangle : IVerb {
private IVerb IVerb; private readonly IVerb IVerb;
/// <summary> /// <summary>
/// Creates a new Triangle instance using <see cref="RegularPolygon"/>. /// Creates a new Triangle instance using <see cref="RegularPolygon"/>.