Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update launch settings #47

Merged
merged 4 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- 3-razor-pages/1-complete/RazorPagesPizza/RazorPagesPizza/RazorPagesPizza.csproj
- 4-minimal-api/0-start/PizzaStore/PizzaStore.csproj
- 4-minimal-api/1-complete/PizzaStore/PizzaStore.csproj
- 5-blazor/0-start/ConnectFour.csproj
- 5-blazor/0-start/ConnectFour/ConnectFour.csproj
- 5-blazor/1-complete/ConnectFour/ConnectFour.csproj

steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
}
},
"profiles": {
"RazorPagesPizza": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5101",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
}
},
"profiles": {
"RazorPagesPizza": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5101",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
11 changes: 10 additions & 1 deletion 4-minimal-api/0-start/PizzaStore/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
}
},
"profiles": {
"PizzaStore": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5112",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
}
},
"profiles": {
"PizzaStore": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5112",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
11 changes: 10 additions & 1 deletion 5-blazor/0-start/ConnectFour/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
}
},
"profiles": {
"ConnectFour": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5007",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
11 changes: 10 additions & 1 deletion 5-blazor/1-complete/ConnectFour/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
}
},
"profiles": {
"ConnectFour": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5007",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
2 changes: 1 addition & 1 deletion 5-blazor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ Let's add some error handling and indicators to our board to make the current st
```

- The `CurrentTurn` property is automatically calculated based on the state of the `winnerMessage` and the `PlayerTurn` property of the `GameState`.
- The `ResetStyle` is calculated based on contents of the `WinnerMessage`. If there's a `winnerMessage`, we make the reset button appear on screen.
- The `ResetStyle` is calculated based on contents of the `winnerMessage`. If there's a `winnerMessage`, we make the reset button appear on screen.

1. Let's handle the error message when a piece is played. Add a line to clear the error message and then wrap the code in the `PlayPiece` method with a `try...catch` block to set the `errorMessage` if an exception occurred:

Expand Down