Skip to content

Review and fix TODO code snippet references (docs 2) #2023

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 5 commits into from
May 2, 2017

Conversation

tompratt-AQ
Copy link
Contributor

Title

Review and fix all TODO code snippet references. (\docs Part 2)

Summary

This PR covers the rest of the conceptual files (\docs) that are listed in the dotnet/docs Project "TODO: review snippet reference". It also fixes issues with .config files from the previous #1982 by calling them with an XML code tag.

Details

Where there are two identical config files, the one in the language folder (and common subfolder) is used instead of the common folder.

Suggested Reviewers

@mairaw

@tompratt-AQ
Copy link
Contributor Author

The following comments are for the changes in this PR:

  1. The file docs/framework/wcf/feature-details/how-to-host-a-wcf-service-in-iis.md has an inline xml snippet that is the same as the xml .config snippet file that is being called. Should the inline code be replaced?
  2. I added code identifiers to several inline code snippets in some of the files.
  3. I changed snippet tags from csharp style comments to XML style comments in some config files. Since we are now calling them with an XML code tag, I was worried it might not find them.

@rpetrusha
Copy link
Contributor

@tompratt-AQ, to respond to your question in #1, if there's a choice between incline code and external code, it's best to use external code. (It's more maintainable.)

Copy link
Contributor

@rpetrusha rpetrusha left a comment

Choose a reason for hiding this comment

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

LGTM, except for one comment about the final character in one C# source code file. And, in response to my last comment, replacing inline code with an external code reference.

@@ -42,19 +42,19 @@ public class LibraryPatron
[DataContract]
public class LibraryItem
{
//code not shown�
//code not shown�
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the final character (rendered as a question mark in a triangle) supposed to be? Make sure the file is saved using UTF-8 encoding (it's probably saved using ASCII encoding).

@tompratt-AQ
Copy link
Contributor Author

I addressed Ron's comments, fixed 4 more files, and fixed one file by re-adding snippets.

Once these clear, there is only one file left in \docs with "<!-- TODO: review snippet reference" in it:
docs/standard/base-types/how-to-display-localized-date-and-time-information-to-web-users.md which has a snippet tag that links to an .aspx file. Before filing a bug on the issue, it seems like there should be a way to make it work with our current snippet tag system.

@tompratt-AQ
Copy link
Contributor Author

Filed issue 982841 about the code snippet that links to the .aspx files. So, we'll leave that TODO as the last one in docs. If everything else checks out here, this should be ready to go!

Copy link
Contributor

@mairaw mairaw left a comment

Choose a reason for hiding this comment

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

This is great @tompratt-AQ! Left a few comments.

[!code-vb[C_HowTo-WCFServiceAndASMXClient#0](../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_howto-wcfserviceandasmxclient/vb/program.vb#0)]
[!code-xml[C_HowTo-WCFServiceAndASMXClient#1](../../../samples/snippets/common/VS_Snippets_CFX/c_howto-wcfserviceandasmxclient/common/app.config#1)]
[!code-vb[C_HowTo-WCFServiceAndASMXClient#0](../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_howto-wcfserviceandasmxclient/vb/program.vb#0)]
[!code-xml[C_HowTo-WCFServiceAndASMXClient#1](../../../samples/snippets/csharp/VS_Snippets_CFX/c_howto-wcfserviceandasmxclient/common/app.config#1)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say as we start changing the references from common to csharp that we also pull the snippet out at the same time and also make sure no other topic is referencing that file.

@@ -47,7 +47,8 @@ To configure a [!INCLUDE[indigo1](../../../../includes/indigo1-md.md)] service e

[!code-csharp[C_HowTo-WCFServiceAndASMXClient#0](../../../../samples/snippets/csharp/VS_Snippets_CFX/c_howto-wcfserviceandasmxclient/cs/program.cs#0)]
[!code-vb[C_HowTo-WCFServiceAndASMXClient#0](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_howto-wcfserviceandasmxclient/vb/program.vb#0)]
<!-- TODO: review snippet reference [!code[C_HowTo-WCFServiceAndASMXClient#1](../../../../samples/snippets/common/VS_Snippets_CFX/c_howto-wcfserviceandasmxclient/common/app.config#1)] -->
[!code-xml[C_HowTo-WCFServiceAndASMXClient#1](../../../../samples/snippets/csharp/VS_Snippets_CFX/c_howto-wcfserviceandasmxclient/common/app.config#1)]
[!code-xml[C_HowTo-WCFServiceAndASMXClient#1](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_howto-wcfserviceandasmxclient/common/app.config#1)]
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this duplicate snippet.

//<snippet100>
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<!-- <snippet100> -->
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this come before as in the original?


<?xml version="1.0" encoding="utf-8" ?>
<!-- <snippet2211> -->
Copy link
Contributor

Choose a reason for hiding this comment

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

same here and in some of the samples below

@tompratt-AQ
Copy link
Contributor Author

@mairaw In this last commit, I did the following:

  1. Fixed the specific issues that you flagged in your last comments.
  2. For all config files that were in TODO links in this PR: I confirmed that there were duplicates between the Common branch and the csharp branch, made sure that any other reference to the Common file were changed, and then deleted the config file in the Common branch.
  3. Deleted other config files that were in the same folder as the deleted dupes after confirming that they also were dupes and weren't being referenced.

@mairaw mairaw closed this May 1, 2017
@mairaw mairaw reopened this May 1, 2017
Copy link
Contributor

@mairaw mairaw left a comment

Choose a reason for hiding this comment

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

It's great to get these fixes in. Thanks @tompratt-AQ!

@mairaw mairaw merged commit 0a2acbf into dotnet:master May 2, 2017
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.

4 participants