You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Instructions/Labs/LAB_AK_02_analyze_document_code.md
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Use the following steps to set up the library application:
40
40
41
41
1. To download a zip file containing the library application, select the following URL: [GitHub Copilot lab - Analyze and document code](https://github.com/MicrosoftLearning/mslearn-github-copilot-dev/raw/refs/heads/main/DownloadableCodeProjects/Downloads/AZ2007LabAppM2.zip)
42
42
43
-
The zip file is named **AZ2007LabAppM2.zip**.
43
+
The zip file is named AZ2007LabAppM2.zip.
44
44
45
45
1. Extract the files from the **AZ2007LabAppM2.zip** file.
46
46
@@ -64,7 +64,7 @@ Use the following steps to set up the library application:
64
64
65
65
1. Navigate to the Windows Desktop folder, select **AccelerateDevGHCopilot** and then select **Select Folder**.
66
66
67
-
1. In the Visual Studio Code SOLUTION EXPLORER view, verify the following solution structure:
67
+
1. In the Visual Studio Code SOLUTION EXPLORER view, expand the solution to show the following solution structure:
68
68
69
69
- AccelerateDevGHCopilot\
70
70
- src\
@@ -82,7 +82,7 @@ Use the following steps to set up the library application:
82
82
83
83
## Use GitHub Copilot to explain the library application codebase
84
84
85
-
It's important to understand an application's architecture and key features before documenting the project. GitHub Copilot can help you to understand an unfamiliar codebase by generating explanations at the solution, file, and code line levels.
85
+
GitHub Copilot can help you to understand an unfamiliar codebase by generating explanations at the solution, file, and code line levels.
86
86
87
87
### Analyze code using prompts in the Chat view
88
88
@@ -94,7 +94,7 @@ GitHub Copilot's Chat view includes a chat-based interface that allows you to in
94
94
95
95
Use the following steps to complete this section of the exercise:
96
96
97
-
1. Ensure that the **AccelerateDevGHCopilot** solution is open in Visual Studio Code.
97
+
1. Ensure that the AccelerateDevGHCopilot solution is open in Visual Studio Code.
98
98
99
99
1. Open GitHub Copilot's Chat view.
100
100
@@ -112,25 +112,25 @@ Use the following steps to complete this section of the exercise:
112
112
@workspace describe this project
113
113
```
114
114
115
-
Use Chat participants, such as the **@workspace**, to scope your prompt to a specific domain. Chat participants are like domain experts who have a specialty that they can help you with. Use @workspace when you want GitHub Copilot to consider the structure of your project, how different parts of your code interact, or design patterns in your project.
115
+
Use Chat participants, such as the **@workspace**, to scope your prompt to a specific domain. Chat participants work like domain experts who can help you in their specialized areas. Use **@workspace** when you want GitHub Copilot to consider the structure of your project, how different parts of your code interact, or design patterns in your project.
116
116
117
117
To see a list of all available chat participants, type **@** in the chat prompt box.
118
118
119
119
1. Take a few minutes to compare GitHub Copilot's response with the actual project files.
120
120
121
-
You should see a response similar to the following description:
121
+
You should see a response that's similar to the following description:
122
122
123
123
```markdown
124
124
125
125
This project is a .NET solution named AccelerateDevGHCopilot that appears to be a library and application framework with a modular structure. It is organized into three main components under the *src* directory and a unit testing project under the *tests* directory. Here's a breakdown:
126
126
127
-
## Solution Structure
127
+
**Solution Structure**
128
128
129
129
- Solution File: AccelerateDevGHCopilot.sln
130
130
131
131
- Contains references to the projects in the solution.
132
132
133
-
## Projects
133
+
**Projects**
134
134
135
135
1. Library.ApplicationCore:
136
136
@@ -158,7 +158,7 @@ Use the following steps to complete this section of the exercise:
158
158
- Uses testing frameworks like xUnit, NSubstitute, and coverlet.collector.
159
159
- Targets .NET 8.0.
160
160
161
-
## Key Features
161
+
**Key Features**
162
162
163
163
- Dependency Injection: The use of Microsoft.Extensions.DependencyInjection suggests that the project employs dependency injection for managing dependencies.
164
164
- Configuration Management: The use of Microsoft.Extensions.Configuration and Microsoft.Extensions.Configuration.Json indicates support for configuration management, likely using JSON files.
@@ -169,11 +169,11 @@ Use the following steps to complete this section of the exercise:
169
169
170
170
1. Use the SOLUTION EXPLORER view to expand the project folders.
171
171
172
-
1. Locate and open the **ConsoleApp.cs** file.
172
+
1. Locate and then open the **ConsoleApp.cs** file.
173
173
174
174
The ConsoleApp.cs file is located in the **src/Library.Console** folder.
175
175
176
-
1. Take a minute to examine the code file.
176
+
1. Take a moment to review the code file.
177
177
178
178
1. Enter a prompt in the Chat view that generates a description of the **ConsoleApp** class.
179
179
@@ -183,7 +183,7 @@ Use the following steps to complete this section of the exercise:
183
183
@workspace #class describe the ConsoleApp class
184
184
```
185
185
186
-
Use chat variables, such as **#class**, to include specific context in your prompt. To see a list of all available chat variables, type **#** in the chat prompt box.
186
+
Use chat variables, such as **#class**, to include specific context in your prompt. To see a list of the chat variables, type **#** in the chat prompt box.
187
187
188
188
> **NOTE**: GitHub Copilot considers your chat history and the code files you have open in Visual Studio Code when constructing a context for your prompt and generating a response.
189
189
@@ -195,7 +195,7 @@ Use the following steps to complete this section of the exercise:
195
195
196
196
The ConsoleApp class in ConsoleApp.cs is responsible for managing the console-based user interface of the library management system. It handles user interactions, processes user inputs, and coordinates actions with the underlying services and repositories.
197
197
198
-
### Fields
198
+
**Fields**
199
199
200
200
- _currentState: Tracks the current state of the console application.
201
201
- matchingPatrons: A list of patrons that match a search query.
@@ -206,11 +206,11 @@ Use the following steps to complete this section of the exercise:
206
206
- _loanService: An instance of ILoanService for performing loan-related operations.
207
207
- _patronService: An instance of IPatronService for performing patron-related operations.
208
208
209
-
### Constructor
209
+
**Constructor**
210
210
211
211
- ConsoleApp(ILoanService loanService, IPatronService patronService, IPatronRepository patronRepository, ILoanRepository loanRepository): Initializes the ConsoleApp with the provided services and repositories.
212
212
213
-
### Methods
213
+
**Methods**
214
214
215
215
- Run(): The main entry point for running the console application.
216
216
- PatronSearch(): Handles the logic for searching patrons.
@@ -292,9 +292,9 @@ Use the following steps to complete this section of the exercise:
292
292
293
293
1. Take a couple minutes to examine the JSON data files that are used to simulate library records.
294
294
295
-
The JSON data files are located in the `src/Library.Console/Json` folder.
295
+
The JSON data files are located in the **src/Library.Console/Json** folder.
296
296
297
-
The data files use ID properties to link entities. For example, a `Loan` object has a `PatronId` property that links to a `Patron` object with the same ID. The JSON files contain data for authors, books, book items, patrons, and loans.
297
+
The data files use ID properties to link entities. For example, a **Loan** object has a **PatronId** property that links to a **Patron** object with the same ID. The JSON files contain data for authors, books, book items, patrons, and loans.
298
298
299
299
> **NOTE**: Notice that Author names, book titles, and patron names have been anonymized for the purposes of this guided project.
0 commit comments