Skip to content

Commit 588e358

Browse files
committed
Make sure unions don't contain extra nested classes
1 parent 39f233a commit 588e358

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/Locator.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ public record InnerText(string Value) : Locator
2626
{
2727
public bool? IgnoreCase { get; set; }
2828

29-
public new MatchType? MatchType { get; set; }
29+
public MatchType? MatchType { get; set; }
3030

3131
public long? MaxDepth { get; set; }
3232
}
3333

3434
public record XPath(string Value) : Locator;
35+
}
3536

36-
public enum MatchType
37-
{
38-
Full,
39-
Partial
40-
}
37+
public enum MatchType
38+
{
39+
Full,
40+
Partial
4141
}

dotnet/src/webdriver/BiDi/Modules/Input/SourceActions.cs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public record Keys : SourceActions, IEnumerable<Key>
2424

2525
public record Pointers : SourceActions, IEnumerable<Pointer>
2626
{
27-
public Parameters? Options { get; set; }
27+
public PointerParameters? Options { get; set; }
2828

2929
public IList<Pointer> Actions { get; set; } = [];
3030

@@ -33,18 +33,6 @@ public record Pointers : SourceActions, IEnumerable<Pointer>
3333
public IEnumerator<Pointer> GetEnumerator() => Actions.GetEnumerator();
3434

3535
IEnumerator IEnumerable.GetEnumerator() => Actions.GetEnumerator();
36-
37-
public record Parameters
38-
{
39-
public Type? PointerType { get; set; }
40-
}
41-
42-
public enum Type
43-
{
44-
Mouse,
45-
Pen,
46-
Touch
47-
}
4836
}
4937

5038
public record Wheels : SourceActions, IEnumerable<Wheel>
@@ -113,23 +101,6 @@ public record Move(int X, int Y) : Pointer, IPointerCommonProperties
113101
public double? AltitudeAngle { get; set; }
114102
public double? AzimuthAngle { get; set; }
115103
}
116-
117-
public interface IPointerCommonProperties
118-
{
119-
public int? Width { get; set; }
120-
121-
public int? Height { get; set; }
122-
123-
public double? Pressure { get; set; }
124-
125-
public double? TangentialPressure { get; set; }
126-
127-
public int? Twist { get; set; }
128-
129-
public double? AltitudeAngle { get; set; }
130-
131-
public double? AzimuthAngle { get; set; }
132-
}
133104
}
134105

135106
[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
@@ -150,3 +121,32 @@ public record Scroll(int X, int Y, int DeltaX, int DeltaY) : Wheel
150121
}
151122
}
152123
}
124+
125+
public record PointerParameters
126+
{
127+
public PointerType? PointerType { get; set; }
128+
}
129+
130+
public enum PointerType
131+
{
132+
Mouse,
133+
Pen,
134+
Touch
135+
}
136+
137+
public interface IPointerCommonProperties
138+
{
139+
public int? Width { get; set; }
140+
141+
public int? Height { get; set; }
142+
143+
public double? Pressure { get; set; }
144+
145+
public double? TangentialPressure { get; set; }
146+
147+
public int? Twist { get; set; }
148+
149+
public double? AltitudeAngle { get; set; }
150+
151+
public double? AzimuthAngle { get; set; }
152+
}

0 commit comments

Comments
 (0)