Skip to content

Commit 023f52f

Browse files
authored
Merge pull request #7430 from ghogen/fix-validation
Fix validation errors
2 parents 0893244 + a3757e7 commit 023f52f

15 files changed

+33
-35
lines changed

docs/azure/vs-azure-tools-publishing-using-powershell-scripts.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ ms.custom: SEO-VS-2020
55
author: ghogen
66
manager: jillfra
77
assetId: 5fff1301-5469-4d97-be88-c85c30f837c1
8-
ms.custom: vs-azure
98
ms.workload: azure-vs
109
ms.topic: conceptual
1110
ms.date: 11/11/2016

docs/code-quality/ca1013.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ To fix a violation of this rule, implement the equality operator so that it is m
5858
## When to suppress warnings
5959
It is safe to suppress a warning from this rule when the default implementation of the equality operator provides the correct behavior for the type.
6060

61-
## Example
61+
## Example 1
6262
The following example defines a type (`BadAddableType`) that violates this rule. This type should implement the equality operator to make any two instances that have the same field values test `true` for equality. The type `GoodAddableType` shows the corrected implementation. Note that this type also implements the inequality operator and overrides <xref:System.Object.Equals%2A> to satisfy other rules. A complete implementation would also implement <xref:System.Object.GetHashCode%2A>.
6363

6464
[!code-csharp[FxCop.Design.AddAndSubtract#1](../code-quality/codesnippet/CSharp/ca1013-overload-operator-equals-on-overloading-add-and-subtract_1.cs)]
6565

66-
## Example
66+
## Example 2
6767
The following example tests for equality by using instances of the types that were previously defined in this topic to illustrate the default and correct behavior for the equality operator.
6868

6969
[!code-csharp[FxCop.Design.TestAddAndSubtract#1](../code-quality/codesnippet/CSharp/ca1013-overload-operator-equals-on-overloading-add-and-subtract_2.cs)]

docs/code-quality/ca2147.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ To resolve the issue, either mark the code that calls the Assert with the <xref:
4545
## When to suppress warnings
4646
Do not suppress a message from this rule.
4747

48-
## Example
48+
## Example 1
4949
This code will fail if `SecurityTestClass` is transparent, when the `Assert` method throws a <xref:System.InvalidOperationException>.
5050

5151
[!code-csharp[FxCop.Security.CA2147.TransparentMethodsMustNotUseSecurityAsserts#1](../code-quality/codesnippet/CSharp/ca2147-transparent-methods-may-not-use-security-asserts_1.cs)]
5252

53-
## Example
53+
## Example 2
5454
One option is to code review the SecurityTransparentMethod method in the example below, and if the method is considered safe for elevation, mark SecurityTransparentMethod with secure-critical. This requires that a detailed, complete, and error-free security audit must be performed on the method together with any call-outs that occur within the method under the Assert:
5555

5656
[!code-csharp[FxCop.Security.SecurityTransparentCode2#1](../code-quality/codesnippet/CSharp/ca2147-transparent-methods-may-not-use-security-asserts_2.cs)]

docs/code-quality/ca2202.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ To fix a violation of this rule, change the implementation so that regardless of
4545

4646
Do not suppress a warning from this rule. Even if <xref:System.IDisposable.Dispose%2A> for the object is known to be safely callable multiple times, the implementation might change in the future.
4747

48-
## Example
48+
## Example 1
4949

5050
Nested `using` statements (`Using` in Visual Basic) can cause violations of the CA2202 warning. If the IDisposable resource of the nested inner `using` statement contains the resource of the outer `using` statement, the `Dispose` method of the nested resource releases the contained resource. When this situation occurs, the `Dispose` method of the outer `using` statement attempts to dispose its resource for a second time.
5151

@@ -61,7 +61,7 @@ using (Stream stream = new FileStream("file.txt", FileMode.OpenOrCreate))
6161
}
6262
```
6363

64-
## Example
64+
## Example 2
6565

6666
To resolve this issue, use a `try`/`finally` block instead of the outer `using` statement. In the `finally` block, make sure that the `stream` resource is not null.
6767

docs/code-quality/ca2240.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ To fix a violation of this rule, make the <xref:System.Runtime.Serialization.ISe
4545
## When to suppress warnings
4646
Do not suppress a warning from this rule.
4747

48-
## Example
48+
## Example 1
4949
The following example shows two serializable types that violate the rule.
5050

5151
[!code-csharp[FxCop.Usage.ImplementISerializableCorrectly#1](../code-quality/codesnippet/CSharp/ca2240-implement-iserializable-correctly_1.cs)]
5252
[!code-vb[FxCop.Usage.ImplementISerializableCorrectly#1](../code-quality/codesnippet/VisualBasic/ca2240-implement-iserializable-correctly_1.vb)]
5353

54-
## Example
54+
## Example 2
5555
The following example fixes the two previous violations by providing an overrideable implementation of <xref:System.Runtime.Serialization.ISerializable.GetObjectData%2A> on the Book class and by providing an implementation of `GetObjectData` on the Library class.
5656

5757
[!code-csharp[FxCop.Usage.ImplementISerializableCorrectly2#1](../code-quality/codesnippet/CSharp/ca2240-implement-iserializable-correctly_2.cs)]

docs/data-tools/handle-a-concurrency-exception.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Add the following code below the code that was added in the previous section:
177177
[!code-csharp[VbRaddataConcurrency#3](../data-tools/codesnippet/CSharp/handle-a-concurrency-exception_4.cs)]
178178
[!code-vb[VbRaddataConcurrency#3](../data-tools/codesnippet/VisualBasic/handle-a-concurrency-exception_4.vb)]
179179

180-
## Test the form
180+
## Test the form behavior
181181

182182
You can now test the form to make sure it behaves as expected. To simulate a concurrency violation, you change data in the database after filling the NorthwindDataSet.
183183

docs/debugger/graphics/0x-2x-4x-msaa-variants.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Overrides multi-sample anti-aliasing (MSAA) settings on all render targets and s
4848

4949
When playback detects these kinds of conflicts, it makes a best effort to replicate the intended behavior, but it might not be possible to match its results exactly. Although it's uncommon for this to affect the performance of these variants in a way that misrepresents their impact, it is possible—for example, when flow control in a pixel shader is determined by the precise content of a texture—because the replicated texture might not have identical contents.
5050

51-
## Example
51+
## Example 1
5252
These variants can be reproduced for render targets created by using `ID3D11Device::CreateTexture2D` by using code like this:
5353

5454
```cpp
@@ -59,7 +59,7 @@ target_description.SampleDesc.Quality = 0;
5959
d3d_device->CreateTexture2D(&target_description, nullptr, &render_target);
6060
```
6161
62-
## Example
62+
## Example 2
6363
Or for swap chains created by using IDXGISwapChain::CreateSwapChain or D3D11CreateDeviceAndSwapChain by using code like this:
6464
6565
```cpp

docs/debugger/graphics/point-bilinear-trilinear-and-anisotropic-texture-filtering-variants.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Overrides the filtering mode on appropriate texture samplers.
5555
## Restrictions and limitations
5656
In Direct3D, feature level 9.1 specifies a maximum anisotropy of 2x. Because the **Anisotropic Texture Filtering** variant attempts to use 16x anisotropy exclusively, playback fails when frame analysis is run on a feature-level 9.1 device. Contemporary devices that are affected by this limitation include the ARM-based Surface RT and Surface 2 Windows tablets. Older GPUs that might still be found in some computers can also be affected, but they're widely considered to be obsolete and are increasingly uncommon.
5757

58-
## Example
58+
## Example 1
5959
The **Point Texture Filtering** variant can be reproduced by using code like this:
6060

6161
```cpp
@@ -69,7 +69,7 @@ d3d_device->CreateSamplerState(&sampler_desc, &sampler);
6969
d3d_context->PSSetSamplers(0, 1, &sampler
7070
```
7171
72-
## Example
72+
## Example 2
7373
The **Bilinear Texture Filtering** variant can be reproduced by using code like this:
7474
7575
```cpp
@@ -83,7 +83,7 @@ d3d_device->CreateSamplerState(&sampler_desc, &sampler);
8383
d3d_context->PSSetSamplers(0, 1, &sampler
8484
```
8585

86-
## Example
86+
## Example 3
8787
The **Trilinear Texture Filtering** variant can be reproduced by using code like this:
8888

8989
```cpp
@@ -97,7 +97,7 @@ d3d_device->CreateSamplerState(&sampler_desc, &sampler);
9797
d3d_context->PSSetSamplers(0, 1, &sampler
9898
```
9999
100-
## Example
100+
## Example 4
101101
The **Anisotropic Texture Filtering** variant can be reproduced by using code like this:
102102
103103
```cpp

docs/debugger/how-to-write-a-run-time-error-reporting-function.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A custom reporting function for run-time errors must have the same declaration a
2424

2525
The following example shows how to define a custom reporting function.
2626

27-
## Example
27+
## Example 1
2828

2929
```cpp
3030
#include <stdio.h>
@@ -55,7 +55,7 @@ int MyErrorFunc(int errorType, const wchar_t *filename,
5555
}
5656
```
5757
58-
## Example
58+
## Example 2
5959
The following example shows a more complex custom reporting function. In this example, the switch statement handles various error types, as defined by the `reportType` parameter of `_CrtDbgReportW`. Because you are replacing `_CrtDbgReportW`, you cannot use `_CrtSetReportMode`. Your function must handle the output. The first variable argument in this function takes a run-time error number. For more information, see [_RTC_SetErrorType](/cpp/c-runtime-library/reference/rtc-seterrortype).
6060
6161
```cpp
@@ -100,7 +100,7 @@ int Catch_RTC_Failure(int errType, const wchar_t *file, int line,
100100
#pragma runtime_checks("", restore)
101101
```
102102

103-
## Example
103+
## Example 3
104104
Use `_RTC_SetErrorFuncW` to install your custom function in place of `_CrtDbgReportW`. For more information, see [_RTC_SetErrorFuncW](/cpp/c-runtime-library/reference/rtc-seterrorfuncw). The `_RTC_SetErrorFuncW` return value is the previous reporting function, which you can save and restore if necessary.
105105

106106
```cpp

docs/debugger/limitations-on-wcf-debugging.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ There are three ways that you can begin debugging a WCF service:
7070
## Self-Hosting
7171
A *self-hosted service* is a WCF service that does not run inside IIS, the WCF Service Host, or the [!INCLUDE[vstecasp](../code-quality/includes/vstecasp_md.md)] Development Server. For information about how to debug a self-hosted service, see [How to: Debug a Self-Hosted WCF Service](../debugger/how-to-debug-a-self-hosted-wcf-service.md).
7272

73-
## Self-Hosting
7473
To enable debugging of [!INCLUDE[vstecasp](../code-quality/includes/vstecasp_md.md)] 3.0 or 3.5 applications, [!INCLUDE[vstecasp](../code-quality/includes/vstecasp_md.md)] 3.0 or 3.5 must be installed before [!INCLUDE[vs_dev10_long](../code-quality/includes/vs_dev10_long_md.md)] is installed. If [!INCLUDE[vs_dev10_long](../code-quality/includes/vs_dev10_long_md.md)] is installed before [!INCLUDE[vstecasp](../code-quality/includes/vstecasp_md.md)] 3.0 or 3.5, an error occurs when you try to debug a [!INCLUDE[vstecasp](../code-quality/includes/vstecasp_md.md)] 3.0 or 3.5 application. The error message is, "Unable to Automatically Step Into the Server." To fix this problem, use the Windows **Control Panel** > **Programs and Features** to repair your [!INCLUDE[vs_dev10_long](../code-quality/includes/vs_dev10_long_md.md)] installation.
7574

7675
## See also

docs/deployment/dependency-element-clickonce-deployment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Identifies the version of the application to install, and the location of the ap
122122
## Remarks
123123
Deployment manifests typically have a single `assemblyIdentity` element that identifies the name and version of the application manifest.
124124

125-
## Example
125+
## Example 1
126126
The following code example shows a `dependency` element in a [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] deployment manifest.
127127

128128
```xml
@@ -141,7 +141,7 @@ Identifies the version of the application to install, and the location of the ap
141141
</dependency>
142142
```
143143

144-
## Example
144+
## Example 2
145145
The following code example specifies a dependency on an assembly already installed in the GAC.
146146

147147
```xml
@@ -152,7 +152,7 @@ Identifies the version of the application to install, and the location of the ap
152152
</dependency>
153153
```
154154

155-
## Example
155+
## Example 3
156156
The following code example specifies a dependency on a specific version of the common language runtime.
157157

158158
```xml
@@ -163,7 +163,7 @@ Identifies the version of the application to install, and the location of the ap
163163
</dependency>
164164
```
165165

166-
## Example
166+
## Example 4
167167
The following code example specifies an operating system dependency.
168168

169169
```xml

docs/extensibility/binding-keyboard-shortcuts-to-menu-items.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ To bind a keyboard shortcut to a custom menu command, just add an entry to the *
7575

7676
To make the command available only in a custom editor, set the `editor` attribute to the name of the custom editor that was generated by the [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] Package Template when you created the VSPackage that includes the custom editor. To find the name value, look in the `<Symbols>` section for a `<GuidSymbol>` node whose `name` attribute ends in "`editorfactory`." This is the name of the custom editor.
7777

78-
## Example
78+
## Example 1
7979
This example binds the keyboard shortcut **Ctrl**+**Alt**+**C** to a command named `cmdidMyCommand` in a package named `MyPackage`.
8080

8181
```
@@ -92,7 +92,7 @@ To bind a keyboard shortcut to a custom menu command, just add an entry to the *
9292
</CommandTable>
9393
```
9494

95-
## Example
95+
## Example 2
9696
This example binds the keyboard shortcut **Ctrl**+**B** to a command named `cmdidBold` in a project named `TestEditor`. The command is available only in the custom editor and not in other editors.
9797

9898
```xml

docs/extensibility/internals/registering-a-project-type.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ When you create a new project type, you must create registry entries that enable
2323
2424
The following examples are from HKEY_CLASSES_ROOT.
2525

26-
## Example
26+
## Example 1
2727

2828
```
2929
\.figp
@@ -52,7 +52,7 @@ When you create a new project type, you must create registry entries that enable
5252

5353
The following examples are from HKEY_LOCAL_MACHINE and are located in the registry under the key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\99.0Exp\Packages].
5454

55-
## Example
55+
## Example 2
5656

5757
```
5858
\{ACEF4EB2-57CF-11D2-96F4-000000000000} (The CLSID for the VSPackage)
@@ -89,7 +89,7 @@ When you create a new project type, you must create registry entries that enable
8989

9090
All the following examples are located in the registry under the key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0Exp\Projects].
9191

92-
## Example
92+
## Example 3
9393

9494
```
9595
\{C061DB26-5833-11D2-96F5-000000000000} (The CLSID for projects of this type)
@@ -153,7 +153,7 @@ When you create a new project type, you must create registry entries that enable
153153

154154
All the following examples are located in the registry under the key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0Exp\Projects].
155155

156-
## Example
156+
## Example 4
157157

158158
```
159159
{FE3BBBB6-72D5-11d2-9ACE-00C04F79A2A4} (The CLSID for Enterprise Projects)
@@ -173,7 +173,7 @@ When you create a new project type, you must create registry entries that enable
173173

174174
All the following examples are located in the registry under the key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0Exp\Projects].
175175

176-
## Example
176+
## Example 5
177177

178178
```
179179
\{A2FE74E1-B743-11d0-AE1A-00A0C90FFFC3} (CLSID for Miscellaneous Files projects)
@@ -194,7 +194,7 @@ When you create a new project type, you must create registry entries that enable
194194

195195
The following example is located in the registry under the key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0Exp\Menus].
196196

197-
## Example
197+
## Example 6
198198

199199
```
200200
"{ACEF4EB2-57CF-11D2-96F4-000000000000}"=",1000,1"

docs/profiling/collecting-concurrency-data-for-an-aspnet-web-application.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ The concurrency method of [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.m
4949

5050
- [Concurrency Visualizer](../profiling/concurrency-visualizer.md)
5151

52-
## Reference
52+
## See also
5353
- [Command-line profiling tools reference](../profiling/command-line-profiling-tools-reference.md)

docs/profiling/profile-currentid.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ ms.workload:
1515
# PROFILE_CURRENTID
1616
The PROFILE_CURRENTID returns the pseudo-token for the thread ID or process ID, in a call to NameProfile, StartProfile, StopProfile, SuspendProfile, and ResumeProfile functions. Use it to cause the function to operate on the current thread or process, rather than a specifically indicated one.
1717

18-
## Example
18+
## Example 1
1919
PROFILE_CURRENTID is defined in *VSPerf.h* as:
2020

2121
```cpp
2222
static const unsigned int PROFILE_CURRENTID = (unsigned int)-1;
2323
```
2424

25-
## Example
25+
## Example 2
2626
The following example illustrates PROFILE_CURRENTID. The example uses PROFILE_CURRENTID as a parameter identifying the current thread in a call to the [StartProfile](../profiling/startprofile.md) function.
2727

2828
```cpp

0 commit comments

Comments
 (0)