Skip to content

Commit

Permalink
improve demos
Browse files Browse the repository at this point in the history
  • Loading branch information
ThijSlim committed Nov 1, 2023
1 parent ff21c51 commit 5200424
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 23 deletions.
18 changes: 4 additions & 14 deletions Demos/2-Comments-To-Code.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
# Comments to Code

## Sample 1 (Method Get Planes by Year)
# 1. Comments to Code (Method Get Planes by Year)

1. Select `PlaneController.cs`

2. Type `// Method to get planes by year`

## Sample 2 (New Property in a different file)

1. Select `Plane.cs`

# Some CoPilot Features in the IDE

## Feature 1 (Explain)

## Feature 2 (Fix This)
# 2. Comments to Code

## Feature 3 (Generate Docs)
1. Edit `Post()` method if plane already exist to return `BadRequest()`

## Feature 4 (Generate Tests)
2. Type `//Return BadRequest if plane already exist`
57 changes: 50 additions & 7 deletions Demos/3-GitHub-CoPilot-Chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,71 @@ It's BETA for everyone

# Interaction 1 (Explain the selected code)

## Question 1:
**Question 1**

1. Select `PlaneController.cs`

```
Can you explain the selected file?
```

## Question 2:
# Feature 1 (Explain)

1. Select a the piece of code

2. CoPilot -> Explain this

# Interaction 2 (Create unit tests):

1. Select code snippet in `PlaneController.cs`

**Question 1**

```
Tell me more about the planes
Can you create unit tests for the selected file?
```

## Question 3:
# Feature 2 (Generate Tests)

```
1. Select a piece of code

2. CoPilot -> Generate Tests

## Feature 3 (Fix This)

1. Add some wrong code

Note the `p.Year == name`

```
[HttpGet("name/{name}")]
public ActionResult<Plane> Get(string name)
{
var plane = Planes.Find(p => p.Year == name);
if (plane == null)
{
return NotFound();
}
return plane;
}
```

2. CoPilot -> Fix This

## Feature 4 (Generate Docs)

# Interaction 2 ():
1. Select a piece of code

# Interaction 3 ():
2. CoPilot -> Generate Tests

# Interaction 4 (Brainstorm about deploying to Azure):

**Question 1**

```
How can I deploy this api to Azure?
```

**_Etc_**

...
7 changes: 5 additions & 2 deletions Demos/4-Setup-GitHub-CoPilot.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Go to GitHub.com/CoPilot
# Installing CoPilot Chat

## Installing CoPilot Chat
- https:/features/copilot

- Install extension from Extensions Marketplace

- Ready to Go

0 comments on commit 5200424

Please sign in to comment.