Skip to content

Commit baa131a

Browse files
authored
Merge pull request MicrosoftDocs#4010 from MicrosoftDocs/master637052224301071978
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 7a0cea3 + 81b74f4 commit baa131a

6 files changed

+31
-25
lines changed

docs/code-quality/ca2225-operator-overloads-have-named-alternates.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ms.assetid: af8f7ab1-63ad-4861-afb9-b7a7a2be15e1
1212
author: gewarren
1313
ms.author: gewarren
1414
manager: jillfra
15-
ms.workload:
16-
- "multiple"
15+
dev_langs:
16+
- CSharp
1717
---
1818
# CA2225: Operator overloads have named alternates
1919

@@ -32,12 +32,16 @@ By default, this rule only looks at externally visible types, but this is [confi
3232

3333
## Rule description
3434

35-
Operator overloading allows the use of symbols to represent computations for a type. For example, a type that overloads the plus symbol (+) for addition would typically have an alternative member named 'Add'. The named alternative member provides access to the same functionality as the operator, and is provided for developers who program in languages that do not support overloaded operators.
35+
Operator overloading allows the use of symbols to represent computations for a type. For example, a type that overloads the plus symbol `+` for addition would typically have an alternative member named `Add`. The named alternative member provides access to the same functionality as the operator. It's provided for developers who program in languages that do not support overloaded operators.
3636

37-
This rule examines the operators listed in the following table.
37+
This rule examines:
3838

39-
|C#|Visual Basic|C++|Alternate name|
40-
|---------|------------------|-----------|--------------------|
39+
- Implicit and explicit cast operators in a type by checking for methods named `To<typename>` and `From<typename>`.
40+
41+
- The operators listed in the following table:
42+
43+
|C#|Visual Basic|C++|Alternate method name|
44+
|-|-|-|-|
4145
|+ (binary)|+|+ (binary)|Add|
4246
|+=|+=|+=|Add|
4347
|&|And|&|BitwiseAnd|
@@ -50,14 +54,14 @@ This rule examines the operators listed in the following table.
5054
|==|=|==|Equals|
5155
|^|Xor|^|Xor|
5256
|^=|Xor=|^=|Xor|
53-
|>|>|>|Compare|
54-
|>=|>=|>=|Compare|
57+
|>|>|>|CompareTo or Compare|
58+
|>=|>=|>=|CompareTo or Compare|
5559
|++|N/A|++|Increment|
56-
|<>|!=|Equals|
60+
|!=|<>|!=|Equals|
5761
|<<|<<|<<|LeftShift|
5862
|<<=|<<=|<<=|LeftShift|
59-
|<|<|<|Compare|
60-
|<=|<=|\<=|Compare|
63+
|<|<|<|CompareTo or Compare|
64+
|<=|<=|\<=|CompareTo or Compare|
6165
|&&|N/A|&&|LogicalAnd|
6266
|&#124;&#124;|N/A|&#124;&#124;|LogicalOr|
6367
|!|N/A|!|LogicalNot|
@@ -75,19 +79,18 @@ This rule examines the operators listed in the following table.
7579
|+ (unary)|N/A|+|Plus|
7680
|false|IsFalse|False|IsTrue (Property)|
7781

78-
N/A == Cannot be overloaded in the selected language.
79-
80-
The rule also checks implicit and explicit cast operators in a type (`SomeType`) by checking for methods named `ToSomeType` and `FromSomeType`.
82+
*N/A means the operator cannot be overloaded in the selected language.
8183

82-
In C#, when a binary operator is overloaded, the corresponding assignment operator, if any, is also implicitly overloaded.
84+
> [!NOTE]
85+
> In C#, when a binary operator is overloaded, the corresponding assignment operator, if any, is also implicitly overloaded.
8386
8487
## How to fix violations
8588

86-
To fix a violation of this rule, implement the alternative method for the operator; name it using the recommended alternative name.
89+
To fix a violation of this rule, implement the alternative method for the operator. Name it using the recommended alternative name.
8790

8891
## When to suppress warnings
8992

90-
Do not suppress a warning from this rule if you are implementing a shared library. Applications can ignore a warning from this rule.
93+
Do not suppress a warning from this rule if you're implementing a shared library. Applications can ignore a warning from this rule.
9194

9295
## Configurability
9396

docs/ide/report-a-problem-perfview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Collect an ETL trace with PerfView
3-
ms.date: 06/27/2019
3+
ms.date: 09/27/2019
44
ms.topic: conceptual
55
helpviewer_keywords:
66
- "perfview"
@@ -22,7 +22,7 @@ PerfView is a tool that creates ETL (event trace log) files based on [Event Trac
2222

2323
## Install PerfView
2424

25-
Download PerfView from the [Microsoft Download Center](http://www.microsoft.com/download/details.aspx?id=28567).
25+
Download PerfView from [GitHub](https://github.com/Microsoft/perfview/blob/master/documentation/Downloading.md).
2626

2727
## Run PerfView
2828

docs/msbuild/special-characters-to-escape.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Special characters must be escaped only if they have special meaning in the cont
3535
|?|Question mark, a wildcard character when describing a file spec in an item's Include/Exclude section.|
3636
|*|Asterisk, a wildcard character when describing a file spec in an item's Include/Exclude section.|
3737

38+
> [!NOTE]
39+
> In some scenarios, you may need to escape double quote (") characters, such as when using within an `Exec` task.
40+
3841
## See also
3942
- [How to: Escape special characters in MSBuild](../msbuild/how-to-escape-special-characters-in-msbuild.md)
4043
- [MSBuild reference](../msbuild/msbuild-reference.md)

docs/msbuild/verifyfilehash-task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This task was added in 15.8, but requires a [workaround](https://github.com/Micr
2828

2929
|Parameter|Description|
3030
|---------------|-----------------|
31-
|`File`|Required <xref:Microsoft.Build.Framework.ITaskItem> parameter.<br /><br />The files to be hashed and validated.|
31+
|`File`|Required `String` parameter.<br /><br />The file to be hashed and validated.|
3232
|`Hash`|Required `String` parameter.<br /><br />The expected hash of the file.|
3333
|`Algorithm`|Optional `String` parameter.<br /><br />The algorithm. Allowed values: `SHA256`, `SHA384`, `SHA512`. Default = `SHA256`.|
3434
|`HashEncoding`|Optional `String` parameter.<br /><br />The encoding to use for generated hashes. Defaults to `hex`. Allowed values = `hex`, `base64`.|

docs/test/microsoft-visualstudio-testtools-cppunittestframework-api-reference.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Microsoft.VisualStudio.TestTools.CppUnitTestFramework API"
3-
ms.date: 06/13/2019
3+
ms.date: 09/27/2019
44
ms.topic: reference
55
ms.author: mblome
66
manager: jillfra
@@ -12,9 +12,7 @@ author: mikeblome
1212

1313
This topic lists the public members of the `Microsoft::VisualStudio::CppUnitTestFramework` namespace. Use these APIs to write C++ unit tests based on the Microsoft Native Unit Test Framework. There is a [Usage Example](#example) at the end of the topic.
1414

15-
The header files are located in the _VisualStudio2012[x86]InstallFolder_**\VC\UnitTest\include** folder.
16-
17-
The lib files are located in the _VisualStudio2012[x86]InstallFolder_**\VC\UnitTest\lib** folder.
15+
The header and lib files are located under *\<Visual Studio installation folder>\VC\Auxiliary\VS\UnitTest*.
1816

1917
Header and lib paths are automatically configured in a Native Test project.
2018

docs/test/writing-unit-tests-for-c-cpp.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Write unit tests for C/C++"
33
description: Write C++ unit tests in Visual Studio using various test frameworks including CTest, Boost.Test and Google Test.
4-
ms.date: 05/06/2019
4+
ms.date: 09/27/2019
55
ms.topic: conceptual
66
ms.author: "mblome"
77
manager: markl
@@ -81,6 +81,8 @@ Next, in your unit test *.cpp* file, add an `#include` directive for any header
8181

8282
![Add include directives](media/cpp-add-includes-test-project.png)
8383

84+
To avoid having to type the full path in each include statement in the source file, you can add the required folders in **Project** > **Properties** > **C/C++** > **General** > **Additional Include Directories**.
85+
8486
### Write test methods
8587

8688
> [!NOTE]

0 commit comments

Comments
 (0)