Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
I3csstatus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jiří Kalvoda
I3csstatus
Commits
207f8fcd
Commit
207f8fcd
authored
2 years ago
by
Jiří Kalvoda
Browse files
Options
Downloads
Patches
Plain Diff
Parser.cs: Remove warnings and change nullable
parent
a4c37500
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Parsers.cs
+4
-2
4 additions, 2 deletions
Parsers.cs
Program.cs
+5
-1
5 additions, 1 deletion
Program.cs
with
9 additions
and
3 deletions
Parsers.cs
+
4
−
2
View file @
207f8fcd
...
...
@@ -83,6 +83,8 @@ interface Parser
void
Init
(
StatusBar
_bar
,
Module
_module
,
ConfigSection
section
);
}
#nullable disable
[
ParserName
(
"text"
)]
class
ParserText
:
Parser
{
...
...
@@ -161,8 +163,8 @@ class ParserICENextStop: Parser
{
try
{
JsonObject
?
json
=
JsonObject
.
Parse
(
data
).
AsObject
();
JsonObject
?
nextStop
=
null
;
JsonObject
json
=
JsonObject
.
Parse
(
data
).
AsObject
();
JsonObject
nextStop
=
null
;
string
nextStopID
=
json
[
"trip"
].
AsObject
()[
"stopInfo"
].
AsObject
()[
"actualNext"
].
GetValue
<
string
>();
foreach
(
var
s
in
json
[
"trip"
].
AsObject
()[
"stops"
].
AsArray
())
{
...
...
This diff is collapsed.
Click to expand it.
Program.cs
+
5
−
1
View file @
207f8fcd
...
...
@@ -98,8 +98,12 @@ abstract class StatusBar
foreach
(
var
s
in
p
)
{
#
pragma
warning
disable
8600
string
type
=
s
[
"_type"
]
??
s
.
SectionName
;
#
pragma
warning
restore
8600
#
pragma
warning
disable
8604
var
constructor
=
moduleTypes
[
type
].
GetConstructor
(
constructorSignature
);
#
pragma
warning
restore
8604
if
(
constructor
==
null
)
throw
new
Exception
(
$"Missing constructor of
{
type
}
module"
);
Module
module
=
(
Module
)
constructor
.
Invoke
(
new
object
[]{});
...
...
@@ -227,7 +231,7 @@ class StatusBarPlainText: RootStatusBar
class
StatusBarTerminal
:
RootStatusBar
{
Thread
inputThread
;
Thread
?
inputThread
;
public
StatusBarTerminal
(
FileInfo
configFile
,
bool
doInput
):
base
(
configFile
)
{
if
(
doInput
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment