Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions .ghal.rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,100 +239,100 @@
"labels-add": ":card_file_box: Technology - C# / VB diagnostics"
},
"(?i).*docs\/csharp\/whats-new.*": {
"labels-add": ":card_file_box: Technology - C# What's New"
"labels-add": ":card_file_box: Technology - C# What's New"
},
"(?i).*docs\/csharp\/how-to.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/linq.*": {
"labels-add": ":card_file_box: Technology - LINQ"
"labels-add": ":card_file_box: Technology - LINQ"
},
"(?i).*docs\/csharp\/programming-guide\/main-and-command-args.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/indexers.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/generics.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/strings.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/types.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/statements-expressions-operators.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/interop.*": {
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
},
"(?i).*docs\/csharp\/programming-guide\/unsafe-code-pointers.*": {
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
},
"(?i).*docs\/csharp\/programming-guide\/exceptions.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/namespaces.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/nullable-types.*": {
"labels-add": ":card_file_box: Technology - C# Null safety"
"labels-add": ":card_file_box: Technology - C# Null safety"
},
"(?i).*docs\/csharp\/programming-guide\/arrays.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/concepts\/covariance-contravariance.*": {
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
},
"(?i).*docs\/csharp\/programming-guide\/concepts\/serialization.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/concepts\/expression-trees.*": {
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
"labels-add": ":card_file_box: Technology - C# Advanced concepts"
},
"(?i).*docs\/csharp\/programming-guide\/concepts\/async.*": {
"labels-add": ":card_file_box: Technology - Async Task"
"labels-add": ":card_file_box: Technology - Async Task"
},
"(?i).*docs\/csharp\/programming-guide\/concepts\/linq.*": {
"labels-add": ":card_file_box: Technology - LINQ"
"labels-add": ":card_file_box: Technology - LINQ"
},
"(?i).*docs\/csharp\/programming-guide\/concepts\/attributes.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/xmldoc.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/classes-and-structs.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/delegates.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/file-system.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/events.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/programming-guide\/inside-a-program.*": {
"labels-add": ":card_file_box: Technology - C# Get Started"
"labels-add": ":card_file_box: Technology - C# Get Started"
},
"(?i).*docs\/csharp\/programming-guide\/interfaces.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/getting-started.*": {
"labels-add": ":card_file_box: Technology - C# Get Started"
"labels-add": ":card_file_box: Technology - C# Get Started"
},
"(?i).*docs\/csharp\/tutorials\/exploration.*": {
"labels-add": ":card_file_box: Technology - C# Get Started"
"labels-add": ":card_file_box: Technology - C# Get Started"
},
"(?i).*docs\/csharp\/tutorial\/intro-to-csharp.*": {
"labels-add": ":card_file_box: Technology - C# Get Started"
"labels-add": ":card_file_box: Technology - C# Get Started"
},
"(?i).*docs\/csharp\/tutorials.*": {
"labels-add": ":card_file_box: Technology - C# Fundamentals"
"labels-add": ":card_file_box: Technology - C# Fundamentals"
},
"(?i).*docs\/csharp\/language-reference\/compiler-messages.*": {
"labels-add": ":card_file_box: Technology - C# / VB diagnostics"
Expand All @@ -344,7 +344,7 @@
"labels-add": ":card_file_box: Technology - Roslyn APIs"
},
"(?i).*docs\/csharp\/tour-of-csharp.*": {
"labels-add": ":card_file_box: Technology - C# Get Started"
"labels-add": ":card_file_box: Technology - C# Get Started"
},
"(?i).*docs\/desktop-wpf*": {
"labels-add": ":books: Area - Desktop Guide,:card_file_box: Technology - WPF"
Expand Down
12 changes: 12 additions & 0 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,10 @@
"source_path": "docs/csharp/programming-guide/arrays/passing-arrays-using-ref-and-out.md",
"redirect_url": "/dotnet/csharp/programming-guide/arrays"
},
{
"source_path": "docs/csharp/programming-guide/concepts/caller-information.md",
"redirect_url": "/dotnet/csharp/language-reference/attributes/caller-information"
},
{
"source_path": "docs/csharp/programming-guide/classes-and-structs/how-to-access-a-collection-class-with-foreach.md",
"redirect_url": "/dotnet/csharp/language-reference/keywords/foreach-in"
Expand Down Expand Up @@ -1139,6 +1143,14 @@
"source_path": "docs/csharp/programming-guide/concepts/async/asynchronous-programming-with-async-and-await.md",
"redirect_url": "/dotnet/csharp/async/"
},
{
"source_path": "docs/csharp/programming-guide/concepts/attributes/attributeusage.md",
"redirect_url": "/dotnet/csharp/language-reference/attributes/general"
},
{
"source_path": "docs/csharp/programming-guide/concepts/attributes/common-attributes.md",
"redirect_url": "/dotnet/csharp/language-reference/attributes/global"
},
{
"source_path": "docs/csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md",
"redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/how-to-join-two-collections-linq-to-xml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ The resulting file is then:
7 COPY . .
8 RUN dotnet restore /ignoreprojectextensions:.dcproj
9 WORKDIR /src/src/Services/Catalog/Catalog.API
10 RUN dotnet publish Catalog.API.csproj -c Release -0 /app
10 RUN dotnet publish Catalog.API.csproj -c Release -o /app
11
12 FROM base AS final
13 WORKDIR /app
Expand Down Expand Up @@ -473,7 +473,7 @@ After the docker-compose up command runs, the application and its related contai

#### Using Visual Studio

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.
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.

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.).

Expand Down
5 changes: 3 additions & 2 deletions docs/azure/migration/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ Learn how to create a virtual machine and publish your app to it: [Publish to an

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.

- Create a virtual machine for your ASP.NET application in Azure using one of the following two options:
- Create a virtual machine for your ASP.NET application in Azure using one of the following options:
- [Create a new virtual machine for ASP.NET Applications](https://go.microsoft.com/fwlink/?linkid=863237)
- [Migrate an existing on-premises virtual machine](https://docs.microsoft.com/azure/site-recovery/tutorial-migrate-on-premises-to-azure)
- [Migrate an existing on-premises VMWare virtual machine](https://docs.microsoft.com/azure/migrate/tutorial-migrate-vmware)
- [Migrate an existing on-premises Hyper-V virtual machine](https://docs.microsoft.com/azure/migrate/tutorial-migrate-hyper-v)
- [Publish your app using Visual Studio](https://go.microsoft.com/fwlink/?linkid=863240)
- [Create a secure virtual network for your VMs](https://docs.microsoft.com/azure/virtual-network/virtual-network-get-started-vnet-subnet)
- [Create a CI/CD pipeline for your application](https://docs.microsoft.com/vsts/build-release/apps/cd/deploy-webdeploy-iis-deploygroups)
Expand Down
2 changes: 1 addition & 1 deletion docs/core/project-sdk/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.topic: conceptual
---
# .NET Core project SDKs

.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.
.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*.

## Available SDKs

Expand Down
2 changes: 1 addition & 1 deletion docs/core/tools/dotnet-tool-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ms.date: 02/14/2020
dotnet tool restore <PACKAGE_NAME>
[--configfile] [--add-source] [tool-manifest]
[--disable-parallel] [--ignore-failed-sources]
[--no-cache] [-interactive] [-v|--verbosity]
[--no-cache] [--interactive] [-v|--verbosity]

dotnet tool restore <-h|--help>
```
Expand Down
69 changes: 69 additions & 0 deletions docs/csharp/language-reference/attributes/caller-information.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: "C# Reserved attributes: Tracking caller information"
ms.date: 04/09/2020
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
---

# Reserved attributes: Determine caller information

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:

|Attribute|Description|Type|
|---|---|---|
|<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`|
|<xref:System.Runtime.CompilerServices.CallerLineNumberAttribute>|Line number in the source file from which the method is called.|`Integer`|
|<xref:System.Runtime.CompilerServices.CallerMemberNameAttribute>|Method name or property name of the caller.|`String`|

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.

```csharp
public void DoProcessing()
{
TraceMessage("Something happened.");
}

public void TraceMessage(string message,
[CallerMemberName] string memberName = "",
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0)
{
Trace.WriteLine("message: " + message);
Trace.WriteLine("member name: " + memberName);
Trace.WriteLine("source file path: " + sourceFilePath);
Trace.WriteLine("source line number: " + sourceLineNumber);
}

// Sample Output:
// message: Something happened.
// member name: DoProcessing
// source file path: c:\Visual Studio Projects\CallerInfoCS\CallerInfoCS\Form1.cs
// source line number: 31
```

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.

### Member names

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:

- Using tracing and diagnostic routines.
- 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.

The following chart shows the member names that are returned when you use the `CallerMemberName` attribute.

|Calls occur within|Member name result|
|-|-|
|Method, property, or event|The name of the method, property, or event from which the call originated.|
|Constructor|The string ".ctor"|
|Static constructor|The string ".cctor"|
|Destructor|The string "Finalize"|
|User-defined operators or conversions|The generated name for the member, for example, "op_Addition".|
|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.|
|No containing member (for example, assembly-level or attributes that are applied to types)|The default value of the optional parameter.|

## See also

- [Named and Optional Arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md)
- <xref:System.Reflection>
- <xref:System.Attribute>
- [Attributes](../../../standard/attributes/index.md)
Loading