Skip to content

Commit 69ae273

Browse files
authored
Merge pull request #3557 from MicrosoftDocs/master636976002051862432
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 373af5d + 8d1b46b commit 69ae273

File tree

6 files changed

+52
-17
lines changed

6 files changed

+52
-17
lines changed

docs/code-quality/annotating-structs-and-classes.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Annotating Structs and Classes
3-
ms.date: 11/04/2016
3+
ms.date: 06/28/2019
44
ms.topic: "conceptual"
55
f1_keywords:
66
- "_Field_size_bytes_part_"
@@ -26,6 +26,7 @@ ms.workload:
2626
- "multiple"
2727
---
2828
# Annotating Structs and Classes
29+
2930
You can annotate struct and class members by using annotations that act like invariants—they are presumed to be true at any function call or function entry/exit that involves the enclosing structure as a parameter or a result value.
3031

3132
## Struct and Class Annotations
@@ -70,6 +71,39 @@ You can annotate struct and class members by using annotations that act like inv
7071
min(pM->nSize, sizeof(MyStruct))
7172
```
7273

74+
## Example
75+
76+
```cpp
77+
#include <sal.h>
78+
// For FIELD_OFFSET macro
79+
#include <windows.h>
80+
81+
// This _Struct_size_bytes_ is equivalent to what below _Field_size_ means.
82+
_Struct_size_bytes_(FIELD_OFFSET(MyBuffer, buffer) + bufferSize * sizeof(int))
83+
struct MyBuffer
84+
{
85+
static int MaxBufferSize;
86+
87+
_Field_z_
88+
const char* name;
89+
90+
int firstField;
91+
92+
// ... other fields
93+
94+
_Field_range_(1, MaxBufferSize)
95+
int bufferSize;
96+
_Field_size_(bufferSize) // Prefered way - easier to read and maintain.
97+
int buffer[0];
98+
};
99+
```
100+
101+
Notes for this example:
102+
103+
- `_Field_z_` is equivalent to `_Null_terminated_`. `_Field_z_` for the name field specifies that the name field is a null-terminated string.
104+
- `_Field_range_` for `bufferSize` specifies that the value of `bufferSize` should be within 1 and `MaxBufferSize` (both inclusive).
105+
- The end results of the `_Struct_size_bytes_` and `_Field_size_` annotations are equivalent. For structures or classes that have a similar layout, `_Field_size_` is easier to read and maintain, because it has fewer references and calculations than the equivalent `_Struct_size_bytes_` annotation. `_Field_size_` doesn’t require conversion to the byte size. If byte size is the only option, for example, for a void pointer field, `_Field_size_bytes_` can be used. If both `_Struct_size_bytes_` and `_Field_size_` exist, both will be available to tools. It is up to the tool what to do if the two annotations disagree.
106+
73107
## See Also
74108
75109
- [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md)

docs/index.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ additionalContent:
163163
- text: Web development
164164
url: /aspnet/
165165
- text: Azure development and management
166-
url: azure/index.yml
166+
url: /visualstudio/azure
167167
- text: Python
168-
url: python/index.yml
168+
url: /visualstudio/python
169169
- text: Node.js
170-
url: javascript/index.yml
170+
url: /visualstudio/javascript
171171
- text: Data storage and processing
172172
url: data-tools/index.md
173173
- text: Data science

docs/vs-2015/modeling/uml-use-case-diagrams-guidelines.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ In Visual Studio, you can draw a *use case diagram* to summarize who uses your a
164164

165165
![Use case showing many to many multiplicity](../modeling/media/uml-ucguidemulti2.png "UML_UCGuideMulti2")
166166

167-
- To state that several actors of the same class can take part in a single occurrence of a use case, set the multiplicity at the actor end of the association to **1..\\***.
167+
- To state that several actors of the same class can take part in a single occurrence of a use case, set the multiplicity at the actor end of the association to **1..\***.
168168

169169
In the illustration, one or more restaurants can take part in fulfilling the same meal order.
170170

171-
- To show that each actor can participate at the same time in several occurrences of a use case, set the multiplicity at the use case end of the association to **\\***.
171+
- To show that each actor can participate at the same time in several occurrences of a use case, set the multiplicity at the use case end of the association to **\***.
172172

173173
In the illustration, each restaurant can work on fulfilling more than one order at a time.
174174

@@ -184,11 +184,11 @@ In Visual Studio, you can draw a *use case diagram* to summarize who uses your a
184184

185185
- **1** to state that exactly one instance of this role participates in each link.
186186

187-
- **1..\\*** to state that one or more instance of this role participate in each link.
187+
- **1..\*** to state that one or more instance of this role participate in each link.
188188

189189
- **0..1** to state that participation is optional.
190190

191-
- **\\*** to state that zero or more instances of this role participate in the link.
191+
- **\*** to state that zero or more instances of this role participate in the link.
192192

193193
> [!NOTE]
194194
> Many teams do not place multiplicity information on use case diagrams, leaving the multiplicities at the default value of 1. Instead, they provide the information in separate descriptions of the use cases. In this case, all the multiplicities in the use case diagrams will be hidden.

mac/2017/asp-net-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ Make sure to complete all four steps successfully to ensure that .NET Core is in
229229

230230
This guide gave an introduction to ASP.NET Core. It describes what it is, when to use it, and provided information on using it in Visual Studio for Mac.
231231
For more information on the next steps from here, refer to the following guides:
232-
- [ASP.NET Core](/aspnet/core/?view=aspnetcore-2.1#build-web-ui-and-web-apis-using-aspnet-core-mvc) docs.
232+
- [ASP.NET Core](/aspnet/core/#build-web-apis-and-web-ui-using-aspnet-core-mvc) docs.
233233
- [Creating Backend Services for Native Mobile Applications](/aspnet/core/mobile/native-mobile-backend), which shows how to build a REST service using ASP.NET Core for a Xamarin.Forms app.
234234
- [ASP.NET Core hands-on lab](https://github.com/Microsoft/vs4mac-labs/tree/master/Web/Getting-Started).
235235

mac/configurations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Each platform has specific configurations for its build.
1717

1818
## Solution configurations
1919

20-
Akin to project configurations, solution configurations are used to create custom configurations for an entire project. By using the **Configuration Mappings** tab under the **Build > Configurations** item, you can assign a target configuration for each solution item, as illustrated in the following image:
20+
Akin to project configurations, solution configurations are used to create custom configurations for an entire project. By using the **Configuration Mappings** tab under the **Build > Configurations** item, you can assign a target configuration for each solution item, as illustrated in the following image:
2121

2222
![Configuration Mapping Options](media/projects-and-solutions-image3.png)
2323

@@ -31,7 +31,7 @@ In Visual Studio for Mac, instead of setting a startup project, you can set a _r
3131

3232
![Run Configuration drop-down](media/projects-and-solutions-image8.png)
3333

34-
A run configuration is a set of execution options with a name and several configurations that are defined in a project for different purposes. Run configurations are defined at the project level, and a default will be created automatically for each executable project, although it is possible to add as many as needed. Certain project types automatically generate additional run configurations. For example, watchOS projects may generate  _Glance and Notification configurations._
34+
A run configuration is a set of execution options with a name and several configurations that are defined in a project for different purposes. Run configurations are defined at the project level, and a default will be created automatically for each executable project, although it is possible to add as many as needed. Certain project types automatically generate additional run configurations. For example, watchOS projects may generate _Glance and Notification configurations._
3535

3636
Configurations can be shared with other developers (in which case the configurations will be stored in the .csproj file) or kept locally (in which case they will be stored in a .user file).
3737

@@ -64,4 +64,4 @@ The following list provides some examples of data that could be included in run
6464

6565
## See also
6666

67-
- [Understand build configurations (Visual Studio on Windows)](/visualstudio/ide/understanding-build-configurations)
67+
- [Understand build configurations (Visual Studio on Windows)](/visualstudio/ide/understanding-build-configurations)

subscriptions/subscriber-benefits.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
title: Visual Studio Subscriptions - Subscriber Benefits
33
author: evanwindom
44
ms.author: jaunger
5-
manager: evelynp
6-
ms.date: 02/12/2018
5+
manager: lank
6+
ms.date: 06/28/2019
77
ms.topic: conceptual
88
description: Learn about the benefits included in your Visual Studio subscription
99
searchscope: VS Subscription
1010
---
1111

1212
# Benefits included in your Visual Studio subscription
1313

14-
Visual Studio subscriptions offer the most comprehensive set of resources for you to create, deploy, and manage great applications on your preferred platforms and devices, including Windows, iOS, Android, and Linux. The specific benefits will vary based on the type of subscription you have. To provide the maximum value for subscribers, the benefits provided change periodically as we make adjustments to focus on the newest and most useful technologies, training materials, and partner benefits available.
14+
Visual Studio subscriptions (formerly known as MSDN subscriptions) offer the most comprehensive set of resources for you to create, deploy, and manage great applications on your preferred platforms and devices, including Windows, iOS, Android, and Linux. The specific benefits will vary based on the type of subscription you have. To provide the maximum value for subscribers, the benefits provided change periodically as we make adjustments to focus on the newest and most useful technologies, training materials, and partner benefits available.
1515

16-
Benefits are grouped into three categories:
16+
17+
Benefits are grouped into three categories in the [subscriber portal](https://my.visualstudio.com/benefits?wt.mc_id=o~msft~docs:).
1718

1819
## Tools
1920
The Tools category provides access to a wide variety of benefits, including flagship benefits such as the [Visual Studio IDE](vs-ide-benefit.md), [Azure DevOps Services](vs-azure-devops.md), and [Azure](vs-azure.md). Depending on your subscription level, you'll also see Windows and Office 365 Developer accounts, Visual Studio App Center, and benefits from partners such as WhiteSource Bolt and ModernRequirements.
@@ -25,7 +26,7 @@ To help you continuously enhance your skillset and keep up with the latest techn
2526
- Microsoft Azure for .Net Developers, and other great content from Pluralsight
2627
- Data Science for Developers from DataCamp
2728
- Designing Database Solutions for SQL Server from Microsoft Virtual Academy
28-
- LinkedIn Learning bring you access to the people, insights, and skills you need to excel.
29+
- LinkedIn Learning brings you access to the people, insights, and skills you need to excel.
2930

3031
## Support
3132
As a Visual Studio subscriber, you also have access to various types of support in case you have a question or need technical assistance.

0 commit comments

Comments
 (0)