Skip to content

Commit 29feb1b

Browse files
committed
Remove helpers
1 parent fe7623a commit 29feb1b

File tree

1 file changed

+3
-51
lines changed

1 file changed

+3
-51
lines changed

dotnet/src/webdriver/BiDi/Modules/Script/RemoteValue.cs

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -95,67 +95,19 @@ public abstract record RemoteValue
9595

9696
throw new BiDiException("Cannot convert .....");
9797
}
98-
99-
public static RemoteBigIntValue BigInt(BigInteger value)
100-
{
101-
return new RemoteBigIntValue(value.ToString());
102-
}
103-
104-
public static RemoteNumberValue Number(double value)
105-
{
106-
return new RemoteNumberValue(value);
107-
}
108-
109-
public static RemoteBooleanValue Boolean(bool value)
110-
{
111-
return new RemoteBooleanValue(value);
112-
}
113-
114-
public static RemoteValue String(string? value)
115-
{
116-
return value is null ? RemoteNullValue.Instance : new RemoteStringValue(value);
117-
}
118-
119-
public static RemoteNullValue Null => RemoteNullValue.Instance;
120-
121-
public static RemoteUndefinedValue Undefined => RemoteUndefinedValue.Instance;
122-
123-
public static RemoteNumberValue NegativeInfinity => RemoteNumberValue.NegativeInfinity;
124-
125-
public static RemoteNumberValue PositiveInfinity => RemoteNumberValue.PositiveInfinity;
126-
127-
public static RemoteNumberValue NaN => RemoteNumberValue.NaN;
128-
129-
public static RemoteNumberValue NegativeZero => RemoteNumberValue.NegativeZero;
13098
}
13199

132100
public record RemoteBigIntValue(string Value) : PrimitiveProtocolRemoteValue;
133101

134-
public record RemoteNumberValue(double Value) : PrimitiveProtocolRemoteValue
135-
{
136-
public static RemoteNumberValue NegativeInfinity { get; } = new RemoteNumberValue(double.NegativeInfinity);
137-
138-
public static RemoteNumberValue PositiveInfinity { get; } = new RemoteNumberValue(double.PositiveInfinity);
139-
140-
public static RemoteNumberValue NaN { get; } = new RemoteNumberValue(double.NaN);
141-
142-
public static RemoteNumberValue NegativeZero { get; } = new RemoteNumberValue(-0.0d);
143-
}
102+
public record RemoteNumberValue(double Value) : PrimitiveProtocolRemoteValue;
144103

145104
public record RemoteBooleanValue(bool Value) : PrimitiveProtocolRemoteValue;
146105

147106
public record RemoteStringValue(string Value) : PrimitiveProtocolRemoteValue;
148107

149-
public record RemoteNullValue : PrimitiveProtocolRemoteValue
150-
{
151-
public static RemoteNullValue Instance { get; } = new RemoteNullValue();
152-
}
108+
public record RemoteNullValue : PrimitiveProtocolRemoteValue;
153109

154-
public record RemoteUndefinedValue : PrimitiveProtocolRemoteValue
155-
{
156-
public static RemoteUndefinedValue Instance { get; } = new RemoteUndefinedValue();
157-
158-
}
110+
public record RemoteUndefinedValue : PrimitiveProtocolRemoteValue;
159111

160112
public record RemoteSymbolValue : RemoteValue
161113
{

0 commit comments

Comments
 (0)