Skip to content

Commit

Permalink
merged 'added dispose'
Browse files Browse the repository at this point in the history
  • Loading branch information
GeminiServer committed Jan 24, 2024
1 parent c8e9903 commit ee33968
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ static async Task<int> Main(string[] args)
Console.ForegroundColor = ConsoleColor.DarkGray;
Console.WriteLine($"Version Remote: {remoteVersion}");
Console.ResetColor();

bool isOpen = false;
do
{
Expand Down Expand Up @@ -180,6 +179,7 @@ static async Task<int> Main(string[] args)
if(arguments.Get<bool>("verbose"))
Console.WriteLine(ex.StackTrace);
Console.ResetColor();
Finish();

Check failure on line 182 in Program.cs

View workflow job for this annotation

GitHub Actions / build

An object reference is required for the non-static field, method, or property 'Program.Finish()'

Check failure on line 182 in Program.cs

View workflow job for this annotation

GitHub Actions / build

An object reference is required for the non-static field, method, or property 'Program.Finish()'
return ex.ErrorCode;
} catch(Exception ex)
{
Expand All @@ -188,16 +188,20 @@ static async Task<int> Main(string[] args)
if(arguments.Get<bool>("verbose"))
Console.WriteLine(ex.StackTrace);
Console.ResetColor();
Finish();

Check failure on line 191 in Program.cs

View workflow job for this annotation

GitHub Actions / build

An object reference is required for the non-static field, method, or property 'Program.Finish()'

Check failure on line 191 in Program.cs

View workflow job for this annotation

GitHub Actions / build

An object reference is required for the non-static field, method, or property 'Program.Finish()'
return -1;
}

Finish();

Check failure on line 195 in Program.cs

View workflow job for this annotation

GitHub Actions / build

An object reference is required for the non-static field, method, or property 'Program.Finish()'

Check failure on line 195 in Program.cs

View workflow job for this annotation

GitHub Actions / build

An object reference is required for the non-static field, method, or property 'Program.Finish()'
return code;
}

private void Finish()
{
if(device != null)
await device.Disconnect();

Check failure on line 202 in Program.cs

View workflow job for this annotation

GitHub Actions / build

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 202 in Program.cs

View workflow job for this annotation

GitHub Actions / build

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.
if(conn != null)
await conn.Disconnect();

Check failure on line 204 in Program.cs

View workflow job for this annotation

GitHub Actions / build

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

Check failure on line 204 in Program.cs

View workflow job for this annotation

GitHub Actions / build

The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.


return code;
}


Expand Down

0 comments on commit ee33968

Please sign in to comment.