Skip to content

Fix git push error for protected CLA branch #3557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 1, 2019
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
36 changes: 35 additions & 1 deletion docs/code-quality/annotating-structs-and-classes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Annotating Structs and Classes
ms.date: 11/04/2016
ms.date: 06/28/2019
ms.topic: "conceptual"
f1_keywords:
- "_Field_size_bytes_part_"
Expand All @@ -26,6 +26,7 @@ ms.workload:
- "multiple"
---
# Annotating Structs and Classes

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.

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

## Example

```cpp
#include <sal.h>
// For FIELD_OFFSET macro
#include <windows.h>

// This _Struct_size_bytes_ is equivalent to what below _Field_size_ means.
_Struct_size_bytes_(FIELD_OFFSET(MyBuffer, buffer) + bufferSize * sizeof(int))
struct MyBuffer
{
static int MaxBufferSize;

_Field_z_
const char* name;

int firstField;

// ... other fields

_Field_range_(1, MaxBufferSize)
int bufferSize;
_Field_size_(bufferSize) // Prefered way - easier to read and maintain.
int buffer[0];
};
```

Notes for this example:

- `_Field_z_` is equivalent to `_Null_terminated_`. `_Field_z_` for the name field specifies that the name field is a null-terminated string.
- `_Field_range_` for `bufferSize` specifies that the value of `bufferSize` should be within 1 and `MaxBufferSize` (both inclusive).
- 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.

## See Also

- [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ additionalContent:
- text: Web development
url: /aspnet/
- text: Azure development and management
url: azure/index.yml
url: /visualstudio/azure
- text: Python
url: python/index.yml
url: /visualstudio/python
- text: Node.js
url: javascript/index.yml
url: /visualstudio/javascript
- text: Data storage and processing
url: data-tools/index.md
- text: Data science
Expand Down
8 changes: 4 additions & 4 deletions docs/vs-2015/modeling/uml-use-case-diagrams-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ In Visual Studio, you can draw a *use case diagram* to summarize who uses your a

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

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

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

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

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

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

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

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

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

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

> [!NOTE]
> 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.
Expand Down
2 changes: 1 addition & 1 deletion mac/2017/asp-net-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Make sure to complete all four steps successfully to ensure that .NET Core is in

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.
For more information on the next steps from here, refer to the following guides:
- [ASP.NET Core](/aspnet/core/?view=aspnetcore-2.1#build-web-ui-and-web-apis-using-aspnet-core-mvc) docs.
- [ASP.NET Core](/aspnet/core/#build-web-apis-and-web-ui-using-aspnet-core-mvc) docs.
- [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.
- [ASP.NET Core hands-on lab](https://github.com/Microsoft/vs4mac-labs/tree/master/Web/Getting-Started).

Expand Down
6 changes: 3 additions & 3 deletions mac/configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Each platform has specific configurations for its build.

## Solution configurations

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

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

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

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

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

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

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

## See also

- [Understand build configurations (Visual Studio on Windows)](/visualstudio/ide/understanding-build-configurations)
- [Understand build configurations (Visual Studio on Windows)](/visualstudio/ide/understanding-build-configurations)
11 changes: 6 additions & 5 deletions subscriptions/subscriber-benefits.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
title: Visual Studio Subscriptions - Subscriber Benefits
author: evanwindom
ms.author: jaunger
manager: evelynp
ms.date: 02/12/2018
manager: lank
ms.date: 06/28/2019
ms.topic: conceptual
description: Learn about the benefits included in your Visual Studio subscription
searchscope: VS Subscription
---

# Benefits included in your Visual Studio subscription

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

Benefits are grouped into three categories:

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

## Tools
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.
Expand All @@ -25,7 +26,7 @@ To help you continuously enhance your skillset and keep up with the latest techn
- Microsoft Azure for .Net Developers, and other great content from Pluralsight
- Data Science for Developers from DataCamp
- Designing Database Solutions for SQL Server from Microsoft Virtual Academy
- LinkedIn Learning bring you access to the people, insights, and skills you need to excel.
- LinkedIn Learning brings you access to the people, insights, and skills you need to excel.

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