@@ -44,8 +44,8 @@ public record SourceActions<T> : SourceActions, IEnumerable<ISourceAction> where
44
44
45
45
[ JsonPolymorphic ( TypeDiscriminatorPropertyName = "type" ) ]
46
46
[ JsonDerivedType ( typeof ( Pause ) , "pause" ) ]
47
- [ JsonDerivedType ( typeof ( Key . Down ) , "keyDown" ) ]
48
- [ JsonDerivedType ( typeof ( Key . Up ) , "keyUp" ) ]
47
+ [ JsonDerivedType ( typeof ( DownKey ) , "keyDown" ) ]
48
+ [ JsonDerivedType ( typeof ( UpKey ) , "keyUp" ) ]
49
49
public interface IKeySourceAction : ISourceAction ;
50
50
51
51
public record KeyActions : SourceActions < IKeySourceAction >
@@ -54,8 +54,8 @@ public KeyActions Type(string text)
54
54
{
55
55
foreach ( var character in text )
56
56
{
57
- Add ( new Key . Down ( character ) ) ;
58
- Add ( new Key . Up ( character ) ) ;
57
+ Add ( new DownKey ( character ) ) ;
58
+ Add ( new UpKey ( character ) ) ;
59
59
}
60
60
61
61
return this ;
@@ -64,9 +64,9 @@ public KeyActions Type(string text)
64
64
65
65
[ JsonPolymorphic ( TypeDiscriminatorPropertyName = "type" ) ]
66
66
[ JsonDerivedType ( typeof ( Pause ) , "pause" ) ]
67
- [ JsonDerivedType ( typeof ( Pointer . Down ) , "pointerDown" ) ]
68
- [ JsonDerivedType ( typeof ( Pointer . Up ) , "pointerUp" ) ]
69
- [ JsonDerivedType ( typeof ( Pointer . Move ) , "pointerMove" ) ]
67
+ [ JsonDerivedType ( typeof ( DownPointer ) , "pointerDown" ) ]
68
+ [ JsonDerivedType ( typeof ( UpPointer ) , "pointerUp" ) ]
69
+ [ JsonDerivedType ( typeof ( MovePointer ) , "pointerMove" ) ]
70
70
public interface IPointerSourceAction : ISourceAction ;
71
71
72
72
public record PointerActions : SourceActions < IPointerSourceAction >
@@ -76,7 +76,7 @@ public record PointerActions : SourceActions<IPointerSourceAction>
76
76
77
77
[ JsonPolymorphic ( TypeDiscriminatorPropertyName = "type" ) ]
78
78
[ JsonDerivedType ( typeof ( Pause ) , "pause" ) ]
79
- [ JsonDerivedType ( typeof ( Wheel . Scroll ) , "scroll" ) ]
79
+ [ JsonDerivedType ( typeof ( ScrollWheel ) , "scroll" ) ]
80
80
public interface IWheelSourceAction : ISourceAction ;
81
81
82
82
public record WheelActions : SourceActions < IWheelSourceAction > ;
@@ -87,52 +87,49 @@ public interface INoneSourceAction : ISourceAction;
87
87
88
88
public record NoneActions : SourceActions < None > ;
89
89
90
- public abstract partial record Key : IKeySourceAction
91
- {
92
- public record Down ( char Value ) : Key ;
90
+ public abstract record Key : IKeySourceAction ;
93
91
94
- public record Up ( char Value ) : Key ;
95
- }
92
+ public record DownKey( char Value ) : Key ;
93
+
94
+ public record UpKey( char Value ) : Key ;
95
+
96
+ public abstract record Pointer : IPointerSourceAction ;
96
97
97
- public abstract record Pointer : IPointerSourceAction
98
+ public record DownPointer ( int Button ) : Pointer , IPointerCommonProperties
98
99
{
99
- public record Down ( int Button ) : Pointer , IPointerCommonProperties
100
- {
101
- public int ? Width { get ; set ; }
102
- public int ? Height { get ; set ; }
103
- public double ? Pressure { get ; set ; }
104
- public double ? TangentialPressure { get ; set ; }
105
- public int ? Twist { get ; set ; }
106
- public double ? AltitudeAngle { get ; set ; }
107
- public double ? AzimuthAngle { get ; set ; }
108
- }
100
+ public int ? Width { get ; set ; }
101
+ public int ? Height { get ; set ; }
102
+ public double ? Pressure { get ; set ; }
103
+ public double ? TangentialPressure { get ; set ; }
104
+ public int ? Twist { get ; set ; }
105
+ public double ? AltitudeAngle { get ; set ; }
106
+ public double ? AzimuthAngle { get ; set ; }
107
+ }
109
108
110
- public record Up ( int Button ) : Pointer ;
109
+ public record UpPointer ( int Button ) : Pointer ;
111
110
112
- public record Move ( int X , int Y ) : Pointer , IPointerCommonProperties
113
- {
114
- public int ? Duration { get ; set ; }
111
+ public record MovePointer ( int X , int Y ) : Pointer , IPointerCommonProperties
112
+ {
113
+ public int ? Duration { get ; set ; }
115
114
116
- public Origin ? Origin { get ; set ; }
115
+ public Origin ? Origin { get ; set ; }
117
116
118
- public int ? Width { get ; set ; }
119
- public int ? Height { get ; set ; }
120
- public double ? Pressure { get ; set ; }
121
- public double ? TangentialPressure { get ; set ; }
122
- public int ? Twist { get ; set ; }
123
- public double ? AltitudeAngle { get ; set ; }
124
- public double ? AzimuthAngle { get ; set ; }
125
- }
117
+ public int ? Width { get ; set ; }
118
+ public int ? Height { get ; set ; }
119
+ public double ? Pressure { get ; set ; }
120
+ public double ? TangentialPressure { get ; set ; }
121
+ public int ? Twist { get ; set ; }
122
+ public double ? AltitudeAngle { get ; set ; }
123
+ public double ? AzimuthAngle { get ; set ; }
126
124
}
127
125
128
- public abstract record Wheel : IWheelSourceAction
126
+ public abstract record Wheel : IWheelSourceAction ;
127
+
128
+ public record ScrollWheel ( int X , int Y , int DeltaX , int DeltaY ) : Wheel
129
129
{
130
- public record Scroll ( int X , int Y , int DeltaX , int DeltaY ) : Wheel
131
- {
132
- public int ? Duration { get ; set ; }
130
+ public int ? Duration { get ; set ; }
133
131
134
- public Origin ? Origin { get ; set ; }
135
- }
132
+ public Origin ? Origin { get ; set ; }
136
133
}
137
134
138
135
public abstract record None : INoneSourceAction ;
0 commit comments