Skip to content

Commit c91110e

Browse files
authored
Merge pull request #17853 from dotnet/publish-29503
Merge master into live
2 parents bb3e731 + 9d3baef commit c91110e

File tree

54 files changed

+1005
-903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1005
-903
lines changed

.ghal.rules.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -239,100 +239,100 @@
239239
"labels-add": ":card_file_box: Technology - C# / VB diagnostics"
240240
},
241241
"(?i).*docs\/csharp\/whats-new.*": {
242-
"labels-add": ":card_file_box: Technology - C# What's New"
242+
"labels-add": ":card_file_box: Technology - C# What's New"
243243
},
244244
"(?i).*docs\/csharp\/how-to.*": {
245-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
245+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
246246
},
247247
"(?i).*docs\/csharp\/linq.*": {
248-
"labels-add": ":card_file_box: Technology - LINQ"
248+
"labels-add": ":card_file_box: Technology - LINQ"
249249
},
250250
"(?i).*docs\/csharp\/programming-guide\/main-and-command-args.*": {
251-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
251+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
252252
},
253253
"(?i).*docs\/csharp\/programming-guide\/indexers.*": {
254-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
254+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
255255
},
256256
"(?i).*docs\/csharp\/programming-guide\/generics.*": {
257-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
257+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
258258
},
259259
"(?i).*docs\/csharp\/programming-guide\/strings.*": {
260-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
260+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
261261
},
262262
"(?i).*docs\/csharp\/programming-guide\/types.*": {
263-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
263+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
264264
},
265265
"(?i).*docs\/csharp\/programming-guide\/statements-expressions-operators.*": {
266-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
266+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
267267
},
268268
"(?i).*docs\/csharp\/programming-guide\/interop.*": {
269-
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
269+
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
270270
},
271271
"(?i).*docs\/csharp\/programming-guide\/unsafe-code-pointers.*": {
272-
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
272+
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
273273
},
274274
"(?i).*docs\/csharp\/programming-guide\/exceptions.*": {
275-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
275+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
276276
},
277277
"(?i).*docs\/csharp\/programming-guide\/namespaces.*": {
278-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
278+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
279279
},
280280
"(?i).*docs\/csharp\/programming-guide\/nullable-types.*": {
281-
"labels-add": ":card_file_box: Technology - C# Null safety"
281+
"labels-add": ":card_file_box: Technology - C# Null safety"
282282
},
283283
"(?i).*docs\/csharp\/programming-guide\/arrays.*": {
284-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
284+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
285285
},
286286
"(?i).*docs\/csharp\/programming-guide\/concepts\/covariance-contravariance.*": {
287-
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
287+
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
288288
},
289289
"(?i).*docs\/csharp\/programming-guide\/concepts\/serialization.*": {
290-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
290+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
291291
},
292292
"(?i).*docs\/csharp\/programming-guide\/concepts\/expression-trees.*": {
293-
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
293+
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
294294
},
295295
"(?i).*docs\/csharp\/programming-guide\/concepts\/async.*": {
296-
"labels-add": ":card_file_box: Technology - Async Task"
296+
"labels-add": ":card_file_box: Technology - Async Task"
297297
},
298298
"(?i).*docs\/csharp\/programming-guide\/concepts\/linq.*": {
299-
"labels-add": ":card_file_box: Technology - LINQ"
299+
"labels-add": ":card_file_box: Technology - LINQ"
300300
},
301301
"(?i).*docs\/csharp\/programming-guide\/concepts\/attributes.*": {
302-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
302+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
303303
},
304304
"(?i).*docs\/csharp\/programming-guide\/xmldoc.*": {
305-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
305+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
306306
},
307307
"(?i).*docs\/csharp\/programming-guide\/classes-and-structs.*": {
308-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
308+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
309309
},
310310
"(?i).*docs\/csharp\/programming-guide\/delegates.*": {
311-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
311+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
312312
},
313313
"(?i).*docs\/csharp\/programming-guide\/file-system.*": {
314-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
314+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
315315
},
316316
"(?i).*docs\/csharp\/programming-guide\/events.*": {
317-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
317+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
318318
},
319319
"(?i).*docs\/csharp\/programming-guide\/inside-a-program.*": {
320-
"labels-add": ":card_file_box: Technology - C# Get Started"
320+
"labels-add": ":card_file_box: Technology - C# Get Started"
321321
},
322322
"(?i).*docs\/csharp\/programming-guide\/interfaces.*": {
323-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
323+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
324324
},
325325
"(?i).*docs\/csharp\/getting-started.*": {
326-
"labels-add": ":card_file_box: Technology - C# Get Started"
326+
"labels-add": ":card_file_box: Technology - C# Get Started"
327327
},
328328
"(?i).*docs\/csharp\/tutorials\/exploration.*": {
329-
"labels-add": ":card_file_box: Technology - C# Get Started"
329+
"labels-add": ":card_file_box: Technology - C# Get Started"
330330
},
331331
"(?i).*docs\/csharp\/tutorial\/intro-to-csharp.*": {
332-
"labels-add": ":card_file_box: Technology - C# Get Started"
332+
"labels-add": ":card_file_box: Technology - C# Get Started"
333333
},
334334
"(?i).*docs\/csharp\/tutorials.*": {
335-
"labels-add": ":card_file_box: Technology - C# Fundamentals"
335+
"labels-add": ":card_file_box: Technology - C# Fundamentals"
336336
},
337337
"(?i).*docs\/csharp\/language-reference\/compiler-messages.*": {
338338
"labels-add": ":card_file_box: Technology - C# / VB diagnostics"
@@ -344,7 +344,7 @@
344344
"labels-add": ":card_file_box: Technology - Roslyn APIs"
345345
},
346346
"(?i).*docs\/csharp\/tour-of-csharp.*": {
347-
"labels-add": ":card_file_box: Technology - C# Get Started"
347+
"labels-add": ":card_file_box: Technology - C# Get Started"
348348
},
349349
"(?i).*docs\/desktop-wpf*": {
350350
"labels-add": ":books: Area - Desktop Guide,:card_file_box: Technology - WPF"

.openpublishing.redirection.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,10 @@
10811081
"source_path": "docs/csharp/programming-guide/arrays/passing-arrays-using-ref-and-out.md",
10821082
"redirect_url": "/dotnet/csharp/programming-guide/arrays"
10831083
},
1084+
{
1085+
"source_path": "docs/csharp/programming-guide/concepts/caller-information.md",
1086+
"redirect_url": "/dotnet/csharp/language-reference/attributes/caller-information"
1087+
},
10841088
{
10851089
"source_path": "docs/csharp/programming-guide/classes-and-structs/how-to-access-a-collection-class-with-foreach.md",
10861090
"redirect_url": "/dotnet/csharp/language-reference/keywords/foreach-in"
@@ -1139,6 +1143,14 @@
11391143
"source_path": "docs/csharp/programming-guide/concepts/async/asynchronous-programming-with-async-and-await.md",
11401144
"redirect_url": "/dotnet/csharp/async/"
11411145
},
1146+
{
1147+
"source_path": "docs/csharp/programming-guide/concepts/attributes/attributeusage.md",
1148+
"redirect_url": "/dotnet/csharp/language-reference/attributes/general"
1149+
},
1150+
{
1151+
"source_path": "docs/csharp/programming-guide/concepts/attributes/common-attributes.md",
1152+
"redirect_url": "/dotnet/csharp/language-reference/attributes/global"
1153+
},
11421154
{
11431155
"source_path": "docs/csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md",
11441156
"redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/how-to-join-two-collections-linq-to-xml"

docs/architecture/microservices/docker-application-development-process/docker-app-development-workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ The resulting file is then:
280280
7 COPY . .
281281
8 RUN dotnet restore /ignoreprojectextensions:.dcproj
282282
9 WORKDIR /src/src/Services/Catalog/Catalog.API
283-
10 RUN dotnet publish Catalog.API.csproj -c Release -0 /app
283+
10 RUN dotnet publish Catalog.API.csproj -c Release -o /app
284284
11
285285
12 FROM base AS final
286286
13 WORKDIR /app
@@ -473,7 +473,7 @@ After the docker-compose up command runs, the application and its related contai
473473

474474
#### Using Visual Studio
475475

476-
Running a multi-container application using Visual Studio 2019 can't get any simpler. You just press **Ctrl-F5** to run or **F5** to debug, as usual, setting up the **docker-compose** project as the startup project. Visual Studio handles all needed setup, so you can create breakpoints as usual and debug what finally become independent processes running in "remote servers", with the debugger already attached. just like that.
476+
Running a multi-container application using Visual Studio 2019 can't get any simpler. You just press **Ctrl-F5** to run or **F5** to debug, as usual, setting up the **docker-compose** project as the startup project. Visual Studio handles all needed setup, so you can create breakpoints as usual and debug what finally become independent processes running in "remote servers", with the debugger already attached, just like that.
477477

478478
As mentioned before, each time you add Docker solution support to a project within a solution, that project is configured in the global (solution-level) docker-compose.yml file, which lets you run or debug the whole solution at once. Visual Studio will start one container for each project that has Docker solution support enabled, and perform all the internal steps for you (dotnet publish, docker build, etc.).
479479

docs/azure/migration/vm.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ Learn how to create a virtual machine and publish your app to it: [Publish to an
1717

1818
These tutorials demonstrate the steps to create (or migrate) a virtual machine, publish your web application to it, and other tasks that may be required to support your application in Azure.
1919

20-
- Create a virtual machine for your ASP.NET application in Azure using one of the following two options:
20+
- Create a virtual machine for your ASP.NET application in Azure using one of the following options:
2121
- [Create a new virtual machine for ASP.NET Applications](https://go.microsoft.com/fwlink/?linkid=863237)
22-
- [Migrate an existing on-premises virtual machine](https://docs.microsoft.com/azure/site-recovery/tutorial-migrate-on-premises-to-azure)
22+
- [Migrate an existing on-premises VMWare virtual machine](https://docs.microsoft.com/azure/migrate/tutorial-migrate-vmware)
23+
- [Migrate an existing on-premises Hyper-V virtual machine](https://docs.microsoft.com/azure/migrate/tutorial-migrate-hyper-v)
2324
- [Publish your app using Visual Studio](https://go.microsoft.com/fwlink/?linkid=863240)
2425
- [Create a secure virtual network for your VMs](https://docs.microsoft.com/azure/virtual-network/virtual-network-get-started-vnet-subnet)
2526
- [Create a CI/CD pipeline for your application](https://docs.microsoft.com/vsts/build-release/apps/cd/deploy-webdeploy-iis-deploygroups)

docs/core/project-sdk/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.topic: conceptual
66
---
77
# .NET Core project SDKs
88

9-
.NET Core projects are associated with a software development kit (SDK). Each project SDK is a set of MSBuild [targets](/visualstudio/msbuild/msbuild-targets) and associated [tasks](/visualstudio/msbuild/msbuild-tasks) that are responsible for compiling, packing, and publishing code.
9+
.NET Core projects are associated with a software development kit (SDK). Each *project SDK* is a set of MSBuild [targets](/visualstudio/msbuild/msbuild-targets) and associated [tasks](/visualstudio/msbuild/msbuild-tasks) that are responsible for compiling, packing, and publishing code. A project that references a project SDK is sometimes referred to as an *SDK-style project*.
1010

1111
## Available SDKs
1212

docs/core/tools/dotnet-tool-restore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ms.date: 02/14/2020
1717
dotnet tool restore <PACKAGE_NAME>
1818
[--configfile] [--add-source] [tool-manifest]
1919
[--disable-parallel] [--ignore-failed-sources]
20-
[--no-cache] [-interactive] [-v|--verbosity]
20+
[--no-cache] [--interactive] [-v|--verbosity]
2121
2222
dotnet tool restore <-h|--help>
2323
```
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: "C# Reserved attributes: Tracking caller information"
3+
ms.date: 04/09/2020
4+
description: These attributes instruct the compiler to generate information about the code that calls a member. You use the CallerFilePath, CallerLineNumber, and CallerMemberName to provide detailed trace information
5+
---
6+
7+
# Reserved attributes: Determine caller information
8+
9+
Using info attributes, you obtain information about the caller to a method. You obtain the file path of the source code, the line number in the source code, and the member name of the caller. To obtain member caller information, you use attributes that are applied to optional parameters. Each optional parameter specifies a default value. The following table lists the Caller Info attributes that are defined in the <xref:System.Runtime.CompilerServices?displayProperty=nameWithType> namespace:
10+
11+
|Attribute|Description|Type|
12+
|---|---|---|
13+
|<xref:System.Runtime.CompilerServices.CallerFilePathAttribute>|Full path of the source file that contains the caller. The full path is the path at compile time.|`String`|
14+
|<xref:System.Runtime.CompilerServices.CallerLineNumberAttribute>|Line number in the source file from which the method is called.|`Integer`|
15+
|<xref:System.Runtime.CompilerServices.CallerMemberNameAttribute>|Method name or property name of the caller.|`String`|
16+
17+
This information helps you write tracing, debugging, and create diagnostic tools. The following example shows how to use caller info attributes. On each call to the `TraceMessage` method, the caller information is substituted as arguments to the optional parameters.
18+
19+
```csharp
20+
public void DoProcessing()
21+
{
22+
TraceMessage("Something happened.");
23+
}
24+
25+
public void TraceMessage(string message,
26+
[CallerMemberName] string memberName = "",
27+
[CallerFilePath] string sourceFilePath = "",
28+
[CallerLineNumber] int sourceLineNumber = 0)
29+
{
30+
Trace.WriteLine("message: " + message);
31+
Trace.WriteLine("member name: " + memberName);
32+
Trace.WriteLine("source file path: " + sourceFilePath);
33+
Trace.WriteLine("source line number: " + sourceLineNumber);
34+
}
35+
36+
// Sample Output:
37+
// message: Something happened.
38+
// member name: DoProcessing
39+
// source file path: c:\Visual Studio Projects\CallerInfoCS\CallerInfoCS\Form1.cs
40+
// source line number: 31
41+
```
42+
43+
You specify an explicit default value for each optional parameter. You can't apply caller info attributes to parameters that aren't specified as optional. The caller info attributes don't make a parameter optional. Instead, they affect the default value that's passed in when the argument is omitted. Caller info values are emitted as literals into the Intermediate Language (IL) at compile time. Unlike the results of the <xref:System.Exception.StackTrace%2A> property for exceptions, the results aren't affected by obfuscation. You can explicitly supply the optional arguments to control the caller information or to hide caller information.
44+
45+
### Member names
46+
47+
You can use the `CallerMemberName` attribute to avoid specifying the member name as a `String` argument to the called method. By using this technique, you avoid the problem that **Rename Refactoring** doesn't change the `String` values. This benefit is especially useful for the following tasks:
48+
49+
- Using tracing and diagnostic routines.
50+
- Implementing the <xref:System.ComponentModel.INotifyPropertyChanged> interface when binding data. This interface allows the property of an object to notify a bound control that the property has changed, so that the control can display the updated information. Without the `CallerMemberName` attribute, you must specify the property name as a literal.
51+
52+
The following chart shows the member names that are returned when you use the `CallerMemberName` attribute.
53+
54+
|Calls occur within|Member name result|
55+
|-|-|
56+
|Method, property, or event|The name of the method, property, or event from which the call originated.|
57+
|Constructor|The string ".ctor"|
58+
|Static constructor|The string ".cctor"|
59+
|Destructor|The string "Finalize"|
60+
|User-defined operators or conversions|The generated name for the member, for example, "op_Addition".|
61+
|Attribute constructor|The name of the method or property to which the attribute is applied. If the attribute is any element within a member (such as a parameter, a return value, or a generic type parameter), this result is the name of the member that's associated with that element.|
62+
|No containing member (for example, assembly-level or attributes that are applied to types)|The default value of the optional parameter.|
63+
64+
## See also
65+
66+
- [Named and Optional Arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md)
67+
- <xref:System.Reflection>
68+
- <xref:System.Attribute>
69+
- [Attributes](../../../standard/attributes/index.md)

0 commit comments

Comments
 (0)