Skip to content

Commit

Permalink
Merge pull request #488 from RHEAGROUP/Fix/remove-duplicate-extension…
Browse files Browse the repository at this point in the history
…-method-present-on-sdk

Fix/remove duplicate extension method present on sdk
  • Loading branch information
Robbware authored Nov 30, 2023
2 parents 51e62d5 + f18c472 commit bc41740
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace COMET.Web.Common.Tests.Extensions
{
using System.Collections.Generic;

using CDP4Common.Helpers;
using CDP4Common.Types;

using COMET.Web.Common.Extensions;
Expand Down
22 changes: 0 additions & 22 deletions COMET.Web.Common/Extensions/ValueArrayExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,6 @@ namespace COMET.Web.Common.Extensions
/// </summary>
public static class ValueArrayExtensions
{
/// <summary>
/// Checks if two <see cref="ValueArray{T}"/> contains the same exact values
/// </summary>
/// <typeparam name="T">the type of the parameter</typeparam>
/// <param name="valueArray">the first value array to compare</param>
/// <param name="comparison">the second value array to compare</param>
/// <returns>True if the contained values are the same, false otherwise</returns>
public static bool ContainsSameValues<T>(this ValueArray<T> valueArray, ValueArray<T> comparison) where T : class
{
if (comparison is null)
{
throw new ArgumentNullException(nameof(comparison));
}

if (valueArray.Count != comparison.Count)
{
return false;
}

return !valueArray.Where((t, i) => !t.Equals(comparison[i])).Any();
}

/// <summary>
/// Adds new default values inside a <see cref="ValueArray{T}"/>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public Task OnMatrixValuesChanged(int index, string value)
{
var orientationMatrix = this.Orientation.Matrix;

if (double.TryParse(value, out var valueParsed))
if (double.TryParse(value, CultureInfo.InvariantCulture, out var valueParsed))
{
orientationMatrix[index] = valueParsed;
this.Orientation = new Orientation(orientationMatrix, this.AngleFormat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
namespace COMETwebapp.Extensions
{
using CDP4Common.EngineeringModelData;
using CDP4Common.Helpers;

using COMET.Web.Common.Extensions;

Expand Down

0 comments on commit bc41740

Please sign in to comment.