diff --git a/libraries/KustoLoco.Core/Evaluation/SummaryKey.cs b/libraries/KustoLoco.Core/Evaluation/SummaryKey.cs
index 2c3468c..9f5c29a 100644
--- a/libraries/KustoLoco.Core/Evaluation/SummaryKey.cs
+++ b/libraries/KustoLoco.Core/Evaluation/SummaryKey.cs
@@ -10,6 +10,11 @@ public record struct SummaryKey
private object? O2;
private object? O3;
private object? O4;
+ private object? O5;
+ private object? O6;
+ private object? O7;
+ private object? O8;
+ private object? O9;
public SummaryKey()
{
@@ -22,20 +27,57 @@ public SummaryKey(object?[] objects)
Set(i, objects[i]);
}
}
-
+ ///
+ /// Sets a value in the key
+ ///
+ ///
+ /// Use with care. SummaryKey is a struct so
+ /// Set only works locally or in preparation for passing
+ /// the record to a method.
+ ///
public void Set(int i, object? o)
{
if (i >= num)
num = i + 1;
- if (i == 0) O0 = o;
- if (i == 1) O1 = o;
- if (i == 2) O2 = o;
- if (i == 3) O3 = o;
- if (i == 4) O4 = o;
- if (i > 4)
- throw new NotImplementedException("summarize limited to 5 vals");
+ switch (i)
+ {
+ case 0:
+ O0 = o;
+ break;
+ case 1:
+ O1 = o;
+ break;
+ case 2:
+ O2 = o;
+ break;
+ case 3:
+ O3 = o;
+ break;
+ case 4:
+ O4 = o;
+ break;
+ case 5:
+ O5 = o;
+ break;
+ case 6:
+ O6 = o;
+ break;
+ case 7:
+ O7 = o;
+ break;
+ case 8:
+ O8 = o;
+ break;
+ case 9:
+ O9 = o;
+ break;
+ case > 9:
+ throw new NotImplementedException("summarize operator is limited to 10 properties");
+ }
}
-
+ ///
+ /// Creates an array of the values in the key
+ ///
public object?[] GetArray()
{
var ret = new object?[num];
@@ -44,6 +86,11 @@ public void Set(int i, object? o)
if (num > 2) ret[2] = O2;
if (num > 3) ret[3] = O3;
if (num > 4) ret[4] = O4;
+ if (num > 5) ret[5] = O5;
+ if (num > 6) ret[6] = O6;
+ if (num > 7) ret[7] = O7;
+ if (num > 8) ret[8] = O8;
+ if (num > 9) ret[9] = O9;
return ret;
}
-}
\ No newline at end of file
+}
diff --git a/libraries/KustoLoco.Core/Evaluation/TreeEvaluator.NpmSummarySet.cs b/libraries/KustoLoco.Core/Evaluation/TreeEvaluator.NpmSummarySet.cs
deleted file mode 100644
index ffab10a..0000000
--- a/libraries/KustoLoco.Core/Evaluation/TreeEvaluator.NpmSummarySet.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace KustoLoco.Core.Evaluation;
-
-internal partial class TreeEvaluator
-{
-}
\ No newline at end of file