Skip to content

Formatting on console-teleprompter #1210

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

Merged
merged 2 commits into from
Nov 8, 2016
Merged

Formatting on console-teleprompter #1210

merged 2 commits into from
Nov 8, 2016

Conversation

BillWagner
Copy link
Member

This addresses the final feedback in PR #1073. I’ll close that PR as this replaces it.

Important: Please to a merge commit instead of a squash commit when we merge this. We want to preserve the original PR commits, including the committer

Update console-teleprompter.md

Update console-teleprompter.md

Update console-teleprompter.md
@saldana
Copy link

saldana commented Nov 6, 2016

Open Publishing Build Service: The pull request content has been published and here are some changed files links of this time:

Status: Succeeded.
Open Publishing Report.

@@ -239,8 +238,8 @@ steps in it and by the end, you’ll have all the updates that you need.
The first step is to create an asynchronous `Task` returning method that
represents the code you’ve created so far to read and display the file.

Add this method to your Program class: (It’s taken from the body of your
Main method:
Add this method to your Program class (It’s taken from the body of your
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I think Program should be formatted as code
  • "It's" should be lowercase, since it is part of the sentence now

@BillWagner
Copy link
Member Author

@svick I made the suggested updates.
I also squashed to make a clean history to merge.

@saldana
Copy link

saldana commented Nov 7, 2016

✅ Validation status: passed

File Status Preview URL Details
docs/csharp/tutorials/console-teleprompter.md ✅Succeeded View Details

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@@ -111,14 +112,14 @@ using System.IO;
```

The `IEnumerable<T>` interface is defined in the
`System.Collections.Generic` namespace. The File class is defined in the
`System.IO namespace`.
`System.Collections.Generic` namespace. The `File` class is defined in the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to change File to @System.IO.File so that it's resolved as a link.

implement the `IDisposable` interface. The `IDisposable` interface
defines a single method, `Dispose()`, that should be called when the
defines a single method, `Dispose`, that should be called when the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here again, it might be better to change these from IDisposable to @System.IDisposable, and from Dispose to @System.IDisposable.Dispose so that they resolve as links.

*implicitly typed local variable*. That means the type of the variable is
determined by the compile time type of the object assigned to the
variable. Here, that is the return value from `File.OpenText()`, which is
variable. Here, that is the return value from `File.OpenText`, which is
a `StreamReader` object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here again, FIle.OpenText could be File.OpenText so it resolves as a link. Similarly, @System.IO.StreamReader instead of StreamReader.

@@ -239,8 +238,8 @@ steps in it and by the end, you’ll have all the updates that you need.
The first step is to create an asynchronous `Task` returning method that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Task-returning. Task could be a link -- @System.Threading.Tasks.Task.

@@ -258,25 +257,25 @@ private static async Task ShowTeleprompter()
```

You’ll notice two changes. First, in the body of the method, instead of
calling `Wait()` to synchronously wait for a task to finish, this version
calling `Wait` to synchronously wait for a task to finish, this version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe resolve this as a link -- @System.Threading.Tasks.Task.Wait.
@BillWagner

@@ -310,12 +309,12 @@ private static async Task GetInput()

This creates a lambda expression to represent an `Action` that reads a key
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the link would be helpful -- @System.Action. Also, perhaps "Action delegate"?

@@ -310,12 +309,12 @@ private static async Task GetInput()

This creates a lambda expression to represent an `Action` that reads a key
from the Console and modifies a local variable representing the delay when
the user presses the ‘<’ or ‘>’ keys. This method uses `Console.ReadKey()`
the user presses the ‘<’ or ‘>’ keys. This method uses `Console.ReadKey`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace with a link to @System.Console.ReadKey?

@@ -376,11 +375,11 @@ private static async Task RunTeleprompter()
}
```

The one new method here is the `Task.WhenAny()` call. That creates a Task
The one new method here is the `Task.WhenAny` call. That creates a `Task`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace with a link to Task.WhenAny?

@BillWagner
Copy link
Member Author

Responded to @rpetrusha feedback and re-squashed.

@BillWagner
Copy link
Member Author

@rpetrusha I made all your suggested changes. Do you want to review again, or is it ready to ship?

@saldana
Copy link

saldana commented Nov 8, 2016

✅ Validation status: passed

File Status Preview URL Details
docs/csharp/tutorials/console-teleprompter.md ✅Succeeded View Details

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@rpetrusha
Copy link
Contributor

@BillWagner I'll review it again quickly.

implement the `IDisposable` interface. The `IDisposable` interface
defines a single method, `Dispose()`, that should be called when the
initialized in the `using` statement (`reader`, in this example) must
implement the `IDisposable` interface. The @System.IDisposables interface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: @System.IDisposable

*implicitly typed local variable*. That means the type of the variable is
determined by the compile time type of the object assigned to the
variable. Here, that is the return value from `File.OpenText()`, which is
a `StreamReader` object.
variable. Here, that is the return value from @File.OpenTexts, which is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be @System.IO.File.OpenText

variable. Here, that is the return value from `File.OpenText()`, which is
a `StreamReader` object.
variable. Here, that is the return value from @File.OpenTexts, which is
a @System.IO.sStreamReader object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: @System.IO.StreamReader

@@ -376,11 +375,11 @@ private static async Task RunTeleprompter()
}
```

The one new method here is the `Task.WhenAny()` call. That creates a Task
The one new method here is the @System.Threading.Tasks.Task.WhenAny call. That creates a `Task`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't resolve. Should be @System.Threading.Tasks.Task.WhenAny(System.Threading.Tasks.Task[]).

@rpetrusha
Copy link
Contributor

@BillWagner A few links didn't resolve. For the last one, you could also use Task.WhenAny for simplicity, though a link to method would be nice. Once those issues are addressed, LGTM.

Also, updated the freshness date, and add the ms.author metadata tag.

Respond to updated feedback

Respond to @rpetrusha feedback.

Fix a few broken links
@BillWagner BillWagner closed this Nov 8, 2016
@BillWagner BillWagner reopened this Nov 8, 2016
@saldana
Copy link

saldana commented Nov 8, 2016

✅ Validation status: passed

File Status Preview URL Details
docs/csharp/tutorials/console-teleprompter.md ✅Succeeded View Details

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@BillWagner
Copy link
Member Author

rebasing and merging.

Thanks @rpetrusha

@BillWagner BillWagner merged commit 325c8a9 into dotnet:master Nov 8, 2016
@BillWagner BillWagner deleted the formatting-console-teleprompter-1073 branch November 8, 2016 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants