Skip to content

Commit c14a532

Browse files
committed
Create types for untyped nodes
1 parent a7b059a commit c14a532

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

src/serialization/UntypedArray.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ public class UntypedArray(IEnumerable<UntypedNode> value) : UntypedNode
1717
/// Gets the collection of untyped child nodes.
1818
/// </summary>
1919
/// <returns>The collection of untyped child nodes.</returns>
20-
public override object GetValue() => _value;
20+
public new IEnumerable<UntypedNode> GetValue() => _value;
2121
}
2222
}

src/serialization/UntypedBoolean.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public class UntypedBoolean(bool value) : UntypedNode
1515
/// Gets the value associated with untyped boolean node.
1616
/// </summary>
1717
/// <returns>The value associated with untyped boolean node.</returns>
18-
public override object GetValue() => _value;
18+
public new bool GetValue() => _value;
1919
}
2020
}

src/serialization/UntypedDecimal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public class UntypedDecimal(decimal value) : UntypedNode
1515
/// Gets the value associated with untyped decimal node.
1616
/// </summary>
1717
/// <returns>The value associated with untyped decimal node.</returns>
18-
public override object GetValue() => _value;
18+
public new decimal GetValue() => _value;
1919
}
2020
}

src/serialization/UntypedDouble.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public class UntypedDouble(double value) : UntypedNode
1515
/// Gets the value associated with untyped double node.
1616
/// </summary>
1717
/// <returns>The value associated with untyped double node.</returns>
18-
public override object GetValue() => _value;
18+
public new double GetValue() => _value;
1919
}
2020
}

src/serialization/UntypedFloat.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public class UntypedFloat(float value) : UntypedNode
1515
/// Gets the value associated with untyped float node.
1616
/// </summary>
1717
/// <returns>The value associated with untyped float node.</returns>
18-
public override object GetValue() => _value;
18+
public new float GetValue() => _value;
1919
}
2020
}

src/serialization/UntypedInteger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public class UntypedInteger(int value): UntypedNode
1515
/// Gets the value associated with untyped integer node.
1616
/// </summary>
1717
/// <returns>The value associated with untyped integer node.</returns>
18-
public override object GetValue() => _value;
18+
public new int GetValue() => _value;
1919
}
2020
}

src/serialization/UntypedLong.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public class UntypedLong(long value) : UntypedNode
1818
/// Gets the value associated with untyped long node.
1919
/// </summary>
2020
/// <returns>The value associated with untyped long node.</returns>
21-
public override object GetValue() => _value;
21+
public new long GetValue() => _value;
2222
}
2323
}

src/serialization/UntypedNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ public static UntypedNode CreateFromDiscriminatorValue(IParseNode parseNode)
3636
/// Gets the value assigned to untyped node.
3737
/// </summary>
3838
/// <returns>The value assigned to untyped node.</returns>
39-
public virtual object? GetValue() => throw new NotImplementedException();
39+
public object? GetValue() => throw new NotImplementedException();
4040
}
4141
}

src/serialization/UntypedNull.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public class UntypedNull : UntypedNode
1313
/// Gets the value associated with untyped null node.
1414
/// </summary>
1515
/// <returns>The value associated with untyped null node.</returns>
16-
public override object? GetValue() => null;
16+
public new object? GetValue() => null;
1717
}
1818
}

src/serialization/UntypedObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ public class UntypedObject(IDictionary<string, UntypedNode> properties) : Untype
1717
/// Gets properties associated with untyped object node.
1818
/// </summary>
1919
/// <returns>Properties associated with untyped object node.</returns>
20-
public override object GetValue() => _properties;
20+
public new IDictionary<string, UntypedNode> GetValue() => _properties;
2121
}
2222
}

0 commit comments

Comments
 (0)