Skip to content

Merge main into live #11432

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 4 commits into from
Jun 11, 2025
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ static void Main()

static void ProcessRequest(object? requestId)
{
// Assign the request ID to the thread-static field
// Assign the request ID to the thread-static field.
_requestId = requestId as string;

// Simulate request processing across multiple method calls
// Simulate request processing across multiple method calls.
PerformDatabaseOperation();
PerformLogging();
}
Expand Down
42 changes: 21 additions & 21 deletions xml/Microsoft.JScript/Typeof.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,27 @@
<summary>Determines the data type of the specified object.</summary>
<returns>The type of <paramref name="value" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The return value can be one of the following string literals:
- boolean
- date
- function
- number
- object
- string
- undefined
- unknown
<format type="text/markdown"><![CDATA[

## Remarks
The return value can be one of the following string literals:

- boolean

- date

- function

- number

- object

- string

- undefined

- unknown

]]></format>
</remarks>
<forInternalUseOnly />
Expand Down
162 changes: 81 additions & 81 deletions xml/Microsoft.SqlServer.Server/SqlUserDefinedTypeAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@
<Docs>
<summary>Used to mark a type definition in an assembly as a user-defined type (UDT) in SQL Server. The properties on the attribute reflect the physical characteristics used when the type is registered with SQL Server. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
SQL Server creates a user-defined type that is bound to the type definition that has the <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute> custom attribute. Every UDT must be annotated with this attribute. See [CLR User-Defined Types](https://go.microsoft.com/fwlink/?LinkId=128028) for more information about UDTs, including an example of a UDT.
## Examples
The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format.
<format type="text/markdown"><![CDATA[

## Remarks
SQL Server creates a user-defined type that is bound to the type definition that has the <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute> custom attribute. Every UDT must be annotated with this attribute. See [CLR User-Defined Types](https://go.microsoft.com/fwlink/?LinkId=128028) for more information about UDTs, including an example of a UDT.



## Examples
The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SqlUserDefinedTypeAttribute Example/CS/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks SqlUserDefinedTypeAttribute Example/VB/source.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks SqlUserDefinedTypeAttribute Example/VB/source.vb" id="Snippet1":::

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -79,17 +79,17 @@
<param name="format">One of the <see cref="T:Microsoft.SqlServer.Server.Format" /> values representing the serialization format of the type.</param>
<summary>A required attribute on a user-defined type (UDT), used to confirm that the given type is a UDT and to indicate the storage format of the UDT.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following example specifies that the `Format` of the user-defined type is `SerializedDataWithMetadata` and the `MaxByteSize` is 8000 bytes.
## Examples
<format type="text/markdown"><![CDATA[

## Remarks
The following example specifies that the `Format` of the user-defined type is `SerializedDataWithMetadata` and the `MaxByteSize` is 8000 bytes.



## Examples
:::code language="csharp" source="~/snippets/csharp/Microsoft.SqlServer.Server/SqlUserDefinedTypeAttribute/Type1.cs" id="Snippet12":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_VBCSharp/VbRaddataSQLObjects/VB/Type1.vb" id="Snippet12":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_VBCSharp/VbRaddataSQLObjects/VB/Type1.vb" id="Snippet12":::

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -145,37 +145,37 @@
<value>
<see langword="true" /> if the user-defined type is byte ordered; otherwise <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When set to `true`, the <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> property in effect guarantees that the serialized binary data can be used for semantic ordering of the information. Thus, each instance of a byte-ordered UDT object can only have one serialized representation. When a comparison operation is performed in SQL Server on the serialized bytes, its results should be the same as if the same comparison operation had taken place in managed code.
The following features are supported when <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> is set to `true`:
- The ability to create indexes on columns of this type.
- The ability to create primary and foreign keys as well as CHECK and UNIQUE constraints on columns of this type.
- The ability to use Transact-SQL ORDER BY, GROUP BY, and PARTITION BY clauses. In these cases, the binary representation of the type is used to determine the order.
- The ability to use comparison operators in Transact-SQL statements.
- The ability to persist computed columns of this type.
Note that both the `Native` and `UserDefined` serialization formats support the following comparison operators when <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> is set to `true`:
- Equal to (=)
- Not equal to (!=)
- Greater than (>)
- Less than (\<)
- Greater than or equal to (>=)
- Less than or equal to (<=)
<format type="text/markdown"><![CDATA[

## Remarks
When set to `true`, the <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> property in effect guarantees that the serialized binary data can be used for semantic ordering of the information. Thus, each instance of a byte-ordered UDT object can only have one serialized representation. When a comparison operation is performed in SQL Server on the serialized bytes, its results should be the same as if the same comparison operation had taken place in managed code.

The following features are supported when <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> is set to `true`:

- The ability to create indexes on columns of this type.

- The ability to create primary and foreign keys as well as CHECK and UNIQUE constraints on columns of this type.

- The ability to use Transact-SQL ORDER BY, GROUP BY, and PARTITION BY clauses. In these cases, the binary representation of the type is used to determine the order.

- The ability to use comparison operators in Transact-SQL statements.

- The ability to persist computed columns of this type.

Note that both the `Native` and `UserDefined` serialization formats support the following comparison operators when <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> is set to `true`:

- Equal to (=)

- Not equal to (!=)

- Greater than (>)

- Less than (\<)

- Greater than or equal to (>=)

- Less than or equal to (<=)

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -205,11 +205,11 @@
<value>
<see langword="true" /> if all instances of this type are the same length; otherwise <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If set to `true`, all instances of UDTs corresponding to this common language runtime (CLR) type must have a length in bytes exactly equal to <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A>. This attribute is only relevant for UDTs with `UserDefined` serialization <xref:Microsoft.SqlServer.Server.Format>.
<format type="text/markdown"><![CDATA[

## Remarks
If set to `true`, all instances of UDTs corresponding to this common language runtime (CLR) type must have a length in bytes exactly equal to <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A>. This attribute is only relevant for UDTs with `UserDefined` serialization <xref:Microsoft.SqlServer.Server.Format>.

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -238,19 +238,19 @@
<summary>The maximum size of the instance, in bytes.</summary>
<value>An <see cref="T:System.Int32" /> value representing the maximum size of the instance.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You must specify the <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> property with the `UserDefined` serialization <xref:Microsoft.SqlServer.Server.Format>.
When connecting to SQL Server 2005 or earlier, <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> must be between 1 and 8000.
When connecting to SQL Server 2008 or later, set <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> between 1 and 8000, for a type whose instances are always 8,000 bytes or less. For types that can have instances larger than 8000, specify -1.
For a UDT with user-defined serialization specified, <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> refers to the total size of the UDT in its serialized form as defined by the user. Consider a UDT with a property of a string of 10 characters (<xref:System.Char>). When the UDT is serialized using a <xref:System.IO.BinaryWriter>, the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A>, the total size of the serialized UDT must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization.
This property should not be used with `Native` serialization <xref:Microsoft.SqlServer.Server.Format>.
<format type="text/markdown"><![CDATA[

## Remarks
You must specify the <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> property with the `UserDefined` serialization <xref:Microsoft.SqlServer.Server.Format>.

When connecting to SQL Server 2005 or earlier, <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> must be between 1 and 8000.

When connecting to SQL Server 2008 or later, set <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> between 1 and 8000, for a type whose instances are always 8,000 bytes or less. For types that can have instances larger than 8000, specify -1.

For a UDT with user-defined serialization specified, <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> refers to the total size of the UDT in its serialized form as defined by the user. Consider a UDT with a property of a string of 10 characters (<xref:System.Char>). When the UDT is serialized using a <xref:System.IO.BinaryWriter>, the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A>, the total size of the serialized UDT must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization.

This property should not be used with `Native` serialization <xref:Microsoft.SqlServer.Server.Format>.

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -279,11 +279,11 @@
<summary>The SQL Server name of the user-defined type.</summary>
<value>A <see cref="T:System.String" /> value representing the SQL Server name of the user-defined type.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.Name%2A> property is not used within SQL Server, but is used by the Microsoft Visual Studio .NET Integrated Development Environment (IDE).
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute.Name%2A> property is not used within SQL Server, but is used by the Microsoft Visual Studio .NET Integrated Development Environment (IDE).

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -312,11 +312,11 @@
<summary>The name of the method used to validate instances of the user-defined type.</summary>
<value>A <see cref="T:System.String" /> representing the name of the method used to validate instances of the user-defined type.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The method specified by this attribute validates instances of the UDT when the UDT has been deserialized from a binary value that is not trusted.
<format type="text/markdown"><![CDATA[

## Remarks
The method specified by this attribute validates instances of the UDT when the UDT has been deserialized from a binary value that is not trusted.

]]></format>
</remarks>
</Docs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
<Docs>
<summary>Provides a type converter to convert <see cref="T:Microsoft.VisualBasic.ApplicationServices.BuiltInRole" /> enumeration values to <see cref="T:System.Security.Principal.WindowsBuiltInRole" /> enumeration values.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This type converter supports the Visual Basic <xref:Microsoft.VisualBasic.ApplicationServices.User> object.
For more information about type converters, see the <xref:System.ComponentModel.TypeConverter> base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)).
<format type="text/markdown"><![CDATA[

## Remarks
This type converter supports the Visual Basic <xref:Microsoft.VisualBasic.ApplicationServices.User> object.

For more information about type converters, see the <xref:System.ComponentModel.TypeConverter> base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)).

> [!CAUTION]
> You should never create an instance of a <xref:Microsoft.VisualBasic.ApplicationServices.BuiltInRoleConverter> class. Instead, call the <xref:System.ComponentModel.TypeDescriptor.GetConverter%2A> method of the <xref:System.ComponentModel.TypeDescriptor> class. For more information, see the examples in the <xref:System.ComponentModel.TypeConverter> base class.
> You should never create an instance of a <xref:Microsoft.VisualBasic.ApplicationServices.BuiltInRoleConverter> class. Instead, call the <xref:System.ComponentModel.TypeDescriptor.GetConverter%2A> method of the <xref:System.ComponentModel.TypeDescriptor> class. For more information, see the examples in the <xref:System.ComponentModel.TypeConverter> base class.

]]></format>
</remarks>
<altmember cref="T:Microsoft.VisualBasic.ApplicationServices.User" />
Expand Down Expand Up @@ -56,11 +56,11 @@
<Docs>
<summary>Initializes a new instance of the <see cref="T:Microsoft.VisualBasic.ApplicationServices.BuiltInRoleConverter" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This type converter supports the Visual Basic <xref:Microsoft.VisualBasic.ApplicationServices.User> object.
<format type="text/markdown"><![CDATA[

## Remarks
This type converter supports the Visual Basic <xref:Microsoft.VisualBasic.ApplicationServices.User> object.

]]></format>
</remarks>
<altmember cref="T:Microsoft.VisualBasic.ApplicationServices.User" />
Expand Down Expand Up @@ -95,13 +95,13 @@
<summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
<returns>A <see cref="T:System.Boolean" /> object that indicates whether this converter can perform the conversion.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `context` parameter can be used to extract additional information about the environment this converter is being invoked from. This can be `Nothing`, so always check. Also, properties on the context object can return `Nothing`.
This type converter supports the Visual Basic <xref:Microsoft.VisualBasic.ApplicationServices.User> object.
<format type="text/markdown"><![CDATA[

## Remarks
The `context` parameter can be used to extract additional information about the environment this converter is being invoked from. This can be `Nothing`, so always check. Also, properties on the context object can return `Nothing`.

This type converter supports the Visual Basic <xref:Microsoft.VisualBasic.ApplicationServices.User> object.

]]></format>
</remarks>
<altmember cref="T:Microsoft.VisualBasic.ApplicationServices.User" />
Expand Down Expand Up @@ -140,15 +140,15 @@
<summary>Converts the given object to another type.</summary>
<returns>The converted object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The most common types to convert to and convert from are string objects. The default implementation makes a call to <xref:System.Object.ToString%2A> on the object if the object is valid and if the destination type is <xref:System.String>.
The `context` parameter can be used to extract additional information about the environment this converter is being invoked from. This can be `Nothing`, so always check. Also, properties on the context object can return `Nothing`.
This type converter supports the Visual Basic <xref:Microsoft.VisualBasic.ApplicationServices.User> object.
<format type="text/markdown"><![CDATA[

## Remarks
The most common types to convert to and convert from are string objects. The default implementation makes a call to <xref:System.Object.ToString%2A> on the object if the object is valid and if the destination type is <xref:System.String>.

The `context` parameter can be used to extract additional information about the environment this converter is being invoked from. This can be `Nothing`, so always check. Also, properties on the context object can return `Nothing`.

This type converter supports the Visual Basic <xref:Microsoft.VisualBasic.ApplicationServices.User> object.

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down
Loading
Loading