File tree Expand file tree Collapse file tree 20 files changed +57
-0
lines changed
OBSWebSocketLibrary/Models Expand file tree Collapse file tree 20 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ public class SourceOrderChanged : EventBase
10
10
[ JsonPropertyName ( "scene-name" ) ]
11
11
public string SceneName { get ; set ; }
12
12
[ JsonPropertyName ( "scene-items" ) ]
13
+ #pragma warning disable CA2227 // Collection properties should be read only
13
14
public IList < TypeDefs . ObsEventSceneItem > SceneItems { get ; set ; }
15
+ #pragma warning restore CA2227 // Collection properties should be read only
14
16
}
15
17
16
18
public class SceneItemAdded : EventBase
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ public class SwitchScenes : EventBase
10
10
[ JsonPropertyName ( "scene-name" ) ]
11
11
public string SceneName { get ; set ; }
12
12
[ JsonPropertyName ( "sources" ) ]
13
+ #pragma warning disable CA2227 // Collection properties should be read only
13
14
public IList < TypeDefs . SceneItem > Sources { get ; set ; }
15
+ #pragma warning restore CA2227 // Collection properties should be read only
14
16
}
15
17
16
18
public class ScenesChanged : EventBase
Original file line number Diff line number Diff line change @@ -58,7 +58,9 @@ public class SourceAudioMixersChanged : EventBase
58
58
[ JsonPropertyName ( "sourceName" ) ]
59
59
public string SourceName { get ; set ; }
60
60
[ JsonPropertyName ( "mixers" ) ]
61
+ #pragma warning disable CA2227 // Collection properties should be read only
61
62
public IList < TypeDefs . ObsMixer > Mixers { get ; set ; }
63
+ #pragma warning restore CA2227 // Collection properties should be read only
62
64
[ JsonPropertyName ( "hexMixersValue" ) ]
63
65
public string HexMixersValue { get ; set ; }
64
66
}
@@ -110,6 +112,8 @@ public class SourceFiltersReordered : EventBase
110
112
[ JsonPropertyName ( "sourceName" ) ]
111
113
public string SourceName { get ; set ; }
112
114
[ JsonPropertyName ( "filters" ) ]
115
+ #pragma warning disable CA2227 // Collection properties should be read only
113
116
public IList < TypeDefs . ObsFilter > Filters { get ; set ; }
117
+ #pragma warning restore CA2227 // Collection properties should be read only
114
118
}
115
119
}
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ public class PreviewSceneChanged : EventBase
10
10
[ JsonPropertyName ( "scene-name" ) ]
11
11
public string SceneName { get ; set ; }
12
12
[ JsonPropertyName ( "GetCurrentScene" ) ]
13
+ #pragma warning disable CA2227 // Collection properties should be read only
13
14
public IList < TypeDefs . SceneItem > GetCurrentScene { get ; set ; }
15
+ #pragma warning restore CA2227 // Collection properties should be read only
14
16
}
15
17
16
18
public class StudioModeSwitched : EventBase
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ namespace OBSWebSocketLibrary.Models.RequestReplies
8
8
public class ListOutputs : RequestReplyBase
9
9
{
10
10
[ JsonPropertyName ( "outputs" ) ]
11
+ #pragma warning disable CA2227 // Collection properties should be read only
11
12
public IList < TypeDefs . Output > Outputs { get ; set ; }
13
+ #pragma warning restore CA2227 // Collection properties should be read only
12
14
}
13
15
14
16
public class GetOutputInfo : RequestReplyBase
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ public class GetCurrentProfile : RequestReplyBase
19
19
public class ListProfiles : RequestReplyBase
20
20
{
21
21
[ JsonPropertyName ( "profiles" ) ]
22
+ #pragma warning disable CA2227 // Collection properties should be read only
22
23
public IList < OBSWebSocketLibrary . Models . TypeDefs . ObsProfile > Profiles { get ; set ; }
24
+ #pragma warning restore CA2227 // Collection properties should be read only
23
25
}
24
26
}
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ public class GetCurrentSceneCollection : RequestReplyBase
18
18
public class ListSceneCollections : RequestReplyBase
19
19
{
20
20
[ JsonPropertyName ( "scene-collections" ) ]
21
+ #pragma warning disable CA2227 // Collection properties should be read only
21
22
public IList < string > SceneCollections { get ; set ; }
23
+ #pragma warning restore CA2227 // Collection properties should be read only
22
24
}
23
25
}
Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ public class GetSceneItemProperties : RequestReplyBase
40
40
[ JsonPropertyName ( "parentGroupName" ) ]
41
41
public string ParentGroupName { get ; set ; }
42
42
[ JsonPropertyName ( "groupChildren" ) ]
43
+ #pragma warning disable CA2227 // Collection properties should be read only
43
44
public IList < TypeDefs . SceneItemTransform > GroupChildren { get ; set ; }
45
+ #pragma warning restore CA2227 // Collection properties should be read only
44
46
}
45
47
46
48
public class SetSceneItemProperties : RequestReplyBase
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . Runtime . Serialization ;
3
4
using System . Text ;
4
5
using System . Text . Json . Serialization ;
5
6
@@ -14,15 +15,19 @@ public class GetCurrentScene : RequestReplyBase
14
15
[ JsonPropertyName ( "name" ) ]
15
16
public string Name { get ; set ; }
16
17
[ JsonPropertyName ( "sources" ) ]
18
+ #pragma warning disable CA2227 // Collection properties should be read only
17
19
public IList < TypeDefs . SceneItem > Sources { get ; set ; }
20
+ #pragma warning restore CA2227 // Collection properties should be read only
18
21
}
19
22
20
23
public class GetSceneList : RequestReplyBase
21
24
{
22
25
[ JsonPropertyName ( "current-scene" ) ]
23
26
public string CurrentScene { get ; set ; }
24
27
[ JsonPropertyName ( "scenes" ) ]
28
+ #pragma warning disable CA2227 // Collection properties should be read only
25
29
public IList < TypeDefs . Scene > Scenes { get ; set ; }
30
+ #pragma warning restore CA2227 // Collection properties should be read only
26
31
}
27
32
28
33
public class ReorderSceneItems : RequestReplyBase
Original file line number Diff line number Diff line change @@ -9,13 +9,17 @@ namespace OBSWebSocketLibrary.Models.RequestReplies
9
9
public class GetSourcesList : RequestReplyBase
10
10
{
11
11
[ JsonPropertyName ( "sources" ) ]
12
+ #pragma warning disable CA2227 // Collection properties should be read only
12
13
public IList < TypeDefs . ObsReplySource > Sources { get ; set ; }
14
+ #pragma warning restore CA2227 // Collection properties should be read only
13
15
}
14
16
15
17
public class GetSourceTypesList : RequestReplyBase
16
18
{
17
19
[ JsonPropertyName ( "types" ) ]
20
+ #pragma warning disable CA2227 // Collection properties should be read only
18
21
public IList < TypeDefs . ObsReplyType > Types { get ; set ; }
22
+ #pragma warning restore CA2227 // Collection properties should be read only
19
23
}
20
24
21
25
public class GetVolume : RequestReplyBase
@@ -217,7 +221,9 @@ public class GetSpecialSources : RequestReplyBase
217
221
public class GetSourceFilters : RequestReplyBase
218
222
{
219
223
[ JsonPropertyName ( "filters" ) ]
224
+ #pragma warning disable CA2227 // Collection properties should be read only
220
225
public IList < TypeDefs . ObsReplyFilter > Filters { get ; set ; }
226
+ #pragma warning restore CA2227 // Collection properties should be read only
221
227
}
222
228
223
229
public class GetSourceFilterInfo : RequestReplyBase
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ public class GetPreviewScene : RequestReplyBase
14
14
[ JsonPropertyName ( "name" ) ]
15
15
public string Name { get ; set ; }
16
16
[ JsonPropertyName ( "sources" ) ]
17
+ #pragma warning disable CA2227 // Collection properties should be read only
17
18
public IList < TypeDefs . SceneItem > Sources { get ; set ; }
19
+ #pragma warning restore CA2227 // Collection properties should be read only
18
20
}
19
21
20
22
public class SetPreviewScene : RequestReplyBase
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ public class GetTransitionList : RequestReplyBase
10
10
[ JsonPropertyName ( "current-transition" ) ]
11
11
public string CurrentTransition { get ; set ; }
12
12
[ JsonPropertyName ( "transitions" ) ]
13
+ #pragma warning disable CA2227 // Collection properties should be read only
13
14
public IList < TypeDefs . ObsTransitionName > Transitions { get ; set ; }
15
+ #pragma warning restore CA2227 // Collection properties should be read only
14
16
}
15
17
16
18
public class GetCurrentTransition : RequestReplyBase
Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ public class ReorderSceneItems : RequestBase
25
25
[ JsonPropertyName ( "scene" ) ]
26
26
public string Scene { get ; set ; }
27
27
[ JsonPropertyName ( "items" ) ]
28
+ #pragma warning disable CA2227 // Collection properties should be read only
28
29
public IList < TypeDefs . ItemObject > Items { get ; set ; }
30
+ #pragma warning restore CA2227 // Collection properties should be read only
29
31
}
30
32
31
33
public class SetSceneTransitionOverride : RequestBase
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ public class Scene
11
11
[ JsonPropertyName ( "name" ) ]
12
12
public string Name { get ; set ; }
13
13
[ JsonPropertyName ( "sources" ) ]
14
+ #pragma warning disable CA2227 // Collection properties should be read only
14
15
public ObservableCollection < SceneItem > Sources { get ; set ; }
16
+ #pragma warning restore CA2227 // Collection properties should be read only
15
17
}
16
18
}
Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ public double Volume
87
87
[ JsonPropertyName ( "parentGroupName" ) ]
88
88
public string ParentGroupName { get ; set ; }
89
89
[ JsonPropertyName ( "groupChildren" ) ]
90
+ #pragma warning disable CA2227 // Collection properties should be read only
90
91
public ObservableCollection < SceneItem > GroupChildren { get ; set ; }
92
+ #pragma warning restore CA2227 // Collection properties should be read only
91
93
[ JsonIgnore ]
92
94
public SourceTypes . BaseType Source
93
95
{
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ public class SceneItemTransform
32
32
[ JsonPropertyName ( "parentGroupName" ) ]
33
33
public string ParentGroupName { get ; set ; }
34
34
[ JsonPropertyName ( "groupChildren" ) ]
35
+ #pragma warning disable CA2227 // Collection properties should be read only
35
36
public IList < SceneItemTransform > GroupChildren { get ; set ; }
37
+ #pragma warning restore CA2227 // Collection properties should be read only
36
38
37
39
public static implicit operator SceneItemTransform ( RequestReplies . GetSceneItemProperties v )
38
40
{
Original file line number Diff line number Diff line change @@ -78,7 +78,9 @@ public string MonitorType
78
78
}
79
79
}
80
80
[ JsonIgnore ]
81
+ #pragma warning disable CA2227 // Collection properties should be read only
81
82
public IList < ObsMixer > Mixers
83
+ #pragma warning restore CA2227 // Collection properties should be read only
82
84
{
83
85
get { return mixers ; }
84
86
set
@@ -98,7 +100,9 @@ public string HexMixersValue
98
100
}
99
101
}
100
102
[ JsonIgnore ]
103
+ #pragma warning disable CA2227 // Collection properties should be read only
101
104
public ObservableCollection < FilterTypes . BaseFilter > Filters { get ; set ; }
105
+ #pragma warning restore CA2227 // Collection properties should be read only
102
106
103
107
[ JsonIgnore ]
104
108
public TypeDefs . ObsReplyType Type { get ; set ; }
Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ public class Scene : BaseType
13
13
[ JsonPropertyName ( "id_counter" ) ]
14
14
public int IdCounter { get ; set ; }
15
15
[ JsonPropertyName ( "items" ) ]
16
+ #pragma warning disable CA2227 // Collection properties should be read only
16
17
public IList < ObsSceneItem > Items { get ; set ; }
18
+ #pragma warning restore CA2227 // Collection properties should be read only
17
19
}
18
20
19
21
public class Group : BaseType
@@ -27,6 +29,8 @@ public class Group : BaseType
27
29
[ JsonPropertyName ( "id_counter" ) ]
28
30
public int IdCounter { get ; set ; }
29
31
[ JsonPropertyName ( "items" ) ]
32
+ #pragma warning disable CA2227 // Collection properties should be read only
30
33
public IList < ObsSceneItem > Items { get ; set ; }
34
+ #pragma warning restore CA2227 // Collection properties should be read only
31
35
}
32
36
}
Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ public bool HasVideoInterface
89
89
get { return ! String . IsNullOrEmpty ( VideoDeviceId ) ; }
90
90
}
91
91
92
+ #pragma warning disable CA2227 // Collection properties should be read only
92
93
public IList < string > FilePaths
94
+ #pragma warning restore CA2227 // Collection properties should be read only
93
95
{
94
96
get { return filePaths ; }
95
97
set
@@ -103,7 +105,9 @@ public bool HasFiles
103
105
get { return FilePaths != null && FilePaths . Count != 0 ; }
104
106
}
105
107
108
+ #pragma warning disable CA2227 // Collection properties should be read only
106
109
public IList < string > Uris
110
+ #pragma warning restore CA2227 // Collection properties should be read only
107
111
{
108
112
get { return uris ; }
109
113
set
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ public class ColorSourceV2 : BaseType
30
30
public class Slideshow : BaseType
31
31
{
32
32
[ JsonPropertyName ( "files" ) ]
33
+ #pragma warning disable CA2227 // Collection properties should be read only
33
34
public IList < ObsFile > Files { get ; set ; }
35
+ #pragma warning restore CA2227 // Collection properties should be read only
34
36
[ JsonPropertyName ( "playback_behavior" ) ]
35
37
public string PlaybackBehavior { get ; set ; }
36
38
[ JsonPropertyName ( "slide_time" ) ]
@@ -172,7 +174,9 @@ public class VlcSource : BaseType
172
174
[ JsonPropertyName ( "playback_behavior" ) ]
173
175
public string PlaybackBehavior { get ; set ; }
174
176
[ JsonPropertyName ( "playlist" ) ]
177
+ #pragma warning disable CA2227 // Collection properties should be read only
175
178
public IList < VlcPlaylistItem > Playlist { get ; set ; }
179
+ #pragma warning restore CA2227 // Collection properties should be read only
176
180
[ JsonPropertyName ( "shuffle" ) ]
177
181
public bool Shuffle { get ; set ; }
178
182
[ JsonPropertyName ( "subtitle" ) ]
You can’t perform that action at this time.
0 commit comments