Skip to content

Commit

Permalink
[Refactor] readonly Thing container as per SQ
Browse files Browse the repository at this point in the history
  • Loading branch information
samatrhea committed Feb 4, 2024
1 parent b3a2f1e commit 300a91a
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions CDP4Common/Types/ValueArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ public class ValueArray<T> : IEnumerable<T>
/// </summary>
private readonly List<T> items;

/// <summary>
/// The container of this <see cref="ValueArray{T}"/>
/// </summary>
private readonly Thing container;

/// <summary>
/// Initializes a new instance of the <see cref="ValueArray{T}"/> class.
/// </summary>
Expand All @@ -65,7 +60,7 @@ public ValueArray()
/// <param name="container">The container of this <see cref="ValueArray{T}"/></param>
public ValueArray(Thing container)
{
this.container = container;
this.Container = container;
this.items = new List<T>();
}

Expand All @@ -90,7 +85,7 @@ public ValueArray(IEnumerable<T> initializationCollection)
public ValueArray(IEnumerable<T> initializationCollection, Thing container)
{
this.items = initializationCollection == null ? new List<T>() : new List<T>(initializationCollection);
this.container = container;
this.Container = container;
}

/// <summary>
Expand Down Expand Up @@ -177,13 +172,11 @@ public override string ToString()
/// <summary>
/// Gets the number of elements contained in the <see cref="ValueArray{T}"/>
/// </summary>
public int Count {
get
{
{
return this.items.Count;
}
}
}
public int Count => this.items.Count;

/// <summary>
/// Gets or sets the container <see cref="Thing"/>
/// </summary>
public Thing Container { get; private set; }
}
}

0 comments on commit 300a91a

Please sign in to comment.