From 300a91a43c26417d89c1c4c82c317ef63bb67a1d Mon Sep 17 00:00:00 2001 From: samatrhea Date: Sun, 4 Feb 2024 16:22:31 +0100 Subject: [PATCH] [Refactor] readonly Thing container as per SQ --- CDP4Common/Types/ValueArray.cs | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/CDP4Common/Types/ValueArray.cs b/CDP4Common/Types/ValueArray.cs index 731baa118..d03aa2f83 100644 --- a/CDP4Common/Types/ValueArray.cs +++ b/CDP4Common/Types/ValueArray.cs @@ -46,11 +46,6 @@ public class ValueArray : IEnumerable /// private readonly List items; - /// - /// The container of this - /// - private readonly Thing container; - /// /// Initializes a new instance of the class. /// @@ -65,7 +60,7 @@ public ValueArray() /// The container of this public ValueArray(Thing container) { - this.container = container; + this.Container = container; this.items = new List(); } @@ -90,7 +85,7 @@ public ValueArray(IEnumerable initializationCollection) public ValueArray(IEnumerable initializationCollection, Thing container) { this.items = initializationCollection == null ? new List() : new List(initializationCollection); - this.container = container; + this.Container = container; } /// @@ -177,13 +172,11 @@ public override string ToString() /// /// Gets the number of elements contained in the /// - public int Count { - get - { - { - return this.items.Count; - } - } - } + public int Count => this.items.Count; + + /// + /// Gets or sets the container + /// + public Thing Container { get; private set; } } } \ No newline at end of file