Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add language slugs (various areas) #11220

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 1 commit into from
Apr 23, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@

The `Path` property can also be set to a qualified network path without a drive connection using the following syntax:

```
```txt
\\servername\sharename\path
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@

The `Path` property can also be set to a qualified network path without a drive connection using the following syntax:

```
```txt
\\servername\sharename\path
```

Expand Down
5 changes: 3 additions & 2 deletions xml/Microsoft.Windows.Themes/BulletChrome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@
<a name="xamlObjectElementUsage_BulletChrome"></a>
## XAML Object Element Usage

```
```xaml
<theme:BulletChrome .../>
```

<a name="xamlValues_BulletChrome"></a>
## XAML Values
`theme:`

`theme:`\
An xmlns prefix for the <xref:Microsoft.Windows.Themes> CLR namespace. Typically, xmlns prefixes and mappings are defined in a XAML root element (not shown).

]]></format>
Expand Down
4 changes: 2 additions & 2 deletions xml/Microsoft.Windows.Themes/ButtonChrome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@
<a name="xamlObjectElementUsage_ButtonChrome"></a>
## XAML Object Element Usage

```
```xaml
<theme:ButtonChrome .../>
```

<a name="xamlValues_ButtonChrome"></a>
## XAML Values
`theme:`
`theme:`\
An xmlns prefix for the <xref:Microsoft.Windows.Themes> CLR namespace. Typically, xmlns prefixes and mappings are defined in a XAML root element (not shown).

]]></format>
Expand Down
6 changes: 3 additions & 3 deletions xml/Microsoft.Windows.Themes/ClassicBorderDecorator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@
<a name="xamlObjectElementUsage_CBD"></a>
## XAML Object Element Usage

```
```xaml
<theme:ClassicBorderDecorator ...>
  singleChild
</theme:ClassicBorderDecorator>
```

<a name="xamlValues_CBD"></a>
## XAML Values
`theme:`
`theme:`\
An xmlns prefix for the <xref:Microsoft.Windows.Themes> CLR namespace. Typically, xmlns prefixes and mappings are defined in a XAML root element (not shown).

*singleChild*
*singleChild*\
A single object element child, representing the object that the border is drawn around. This object must be a <xref:System.Windows.UIElement>. Typical child elements are either a fixed <xref:System.Windows.UIElement> (for example a <xref:System.Windows.Shapes.Path>) or are a presenter or another decorator in compositing.

]]></format>
Expand Down
6 changes: 3 additions & 3 deletions xml/Microsoft.Windows.Themes/DataGridHeaderBorder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@
<a name="xamlObjectElementUsage_DGHB"></a>
## XAML Object Element Usage

```
```xaml
<theme:DataGridHeaderBorder ...>
  singleChild
</theme:DataGridHeaderBorder>
```

<a name="xamlValues_DGHB"></a>
## XAML Values
`theme:`
`theme:`\
An xmlns prefix for the <xref:Microsoft.Windows.Themes> CLR namespace. Typically, xmlns prefixes and mappings are defined in a XAML root element (not shown).

*singleChild*
*singleChild*\
A single object element child, representing the object that the border is drawn around. This object must be a <xref:System.Windows.UIElement>.

]]></format>
Expand Down
6 changes: 3 additions & 3 deletions xml/Microsoft.Windows.Themes/ListBoxChrome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@
<a name="xamlObjectElementUsage_LBC"></a>
## XAML Object Element Usage

```
```xaml
<theme:ListBoxChrome ...>
  singleChild
</theme:ListBoxChrome>
```

<a name="xamlValues_LBC"></a>
## XAML Values
`theme:`
`theme:`\
An xmlns prefix for the <xref:Microsoft.Windows.Themes> CLR namespace. Typically, xmlns prefixes and mappings are defined in a XAML root element (not shown).

*singleChild*
*singleChild*\
A single object element child, representing the object that the decorator is drawn around. This object must be a <xref:System.Windows.UIElement>.

]]></format>
Expand Down
4 changes: 2 additions & 2 deletions xml/Microsoft.Windows.Themes/ScrollChrome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@
<a name="xamlObjectElementUsage_SC"></a>
## XAML Object Element Usage

```
```xaml
<theme:ScrollChrome .../>
```

<a name="xamlValues_SC"></a>
## XAML Values
`theme:`
`theme:`\
An xmlns prefix for the <xref:Microsoft.Windows.Themes> CLR namespace. Typically, xmlns prefixes and mappings are defined in a XAML root element (not shown).

]]></format>
Expand Down
10 changes: 2 additions & 8 deletions xml/System.Activities.Presentation/ActivityDesigner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,16 @@

The <xref:System.Activities.Presentation.ActivityDesigner> inherits from <xref:System.Activities.Presentation.WorkflowViewElement> and primarily adds the default styling, as well as the ability to customize the icon via the <xref:System.Activities.Presentation.ActivityDesigner.Icon%2A> property. It should be used whenever you are creating a designer for a type that derives from <xref:System.Activities.Activity>. When associated with an <xref:System.Activities.Activity> type, the <xref:System.Activities.Presentation.WorkflowViewElement.ModelItem%2A> property will point to the ModelItem hierarchy describing the instance of that type being edited.



## Examples
In the sample code below, a `First2of3` activity is defined first, then the code for the First2of3 designer is shown, and finally it is shown how to use the Designer attribute to associate the activity with the designer is provided.

```

//The First2of3 activity
```csharp
using System.Activities;
using System.Collections.Generic;
using System.Linq;

namespace Microsoft.Activities.Documentation.ActivityTypes
{

public sealed class First2of3 : NativeActivity
{
public Activity Activity1 { get; set; }
Expand Down Expand Up @@ -112,10 +107,9 @@ namespace Microsoft.Activities.Documentation.ActivityTypes
</StackPanel>
</sap:ActivityDesigner>

//Code for associating the activity with the designer using the Designer attribute.
// Code for associating the activity with the designer using the Designer attribute.
[Designer(typeof(First2of3Designer))]
public sealed class First2of3 : NativeActivity

```

]]></format>
Expand Down
12 changes: 5 additions & 7 deletions xml/System.ComponentModel.Design/DesignerTransaction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,26 @@
To perform an action within a transaction, you must first create a transaction. Then you must call the <xref:System.ComponentModel.Design.IComponentChangeService.OnComponentChanging%2A> method before each change or set of changes occurs, and the <xref:System.ComponentModel.Design.IComponentChangeService.OnComponentChanged%2A> method after each change or set of changes occur. Finally, complete and close the transaction by calling the <xref:System.ComponentModel.Design.DesignerTransaction.Commit%2A> method.

> [!NOTE]
> When making changes to property values, use the <xref:System.ComponentModel.PropertyDescriptor.SetValue%2A> method of a <xref:System.ComponentModel.PropertyDescriptor>, which calls the component change methods of the <xref:System.ComponentModel.Design.IComponentChangeService> and creates a <xref:System.ComponentModel.Design.DesignerTransaction> representing the change automatically.
> When making changes to property values, use the <xref:System.ComponentModel.PropertyDescriptor.SetValue%2A> method of a <xref:System.ComponentModel.PropertyDescriptor>, which calls the component change methods of the <xref:System.ComponentModel.Design.IComponentChangeService> and creates a <xref:System.ComponentModel.Design.DesignerTransaction> representing the change automatically.

To perform a transaction, complete the following steps:

1. Call <xref:System.ComponentModel.Design.IDesignerHost.CreateTransaction%2A> to obtain a <xref:System.ComponentModel.Design.DesignerTransaction> that can be used to control the transaction.
1. Call <xref:System.ComponentModel.Design.IDesignerHost.CreateTransaction%2A> to obtain a <xref:System.ComponentModel.Design.DesignerTransaction> that can be used to control the transaction.

2. Within a `try` block, for each action that you want to track with a <xref:System.ComponentModel.Design.DesignerTransaction>, call the <xref:System.ComponentModel.Design.IComponentChangeService.OnComponentChanging%2A> method, make the change or changes, then call the <xref:System.ComponentModel.Design.IComponentChangeService.OnComponentChanged%2A> method to signal that the change or changes have been made.
2. Within a `try` block, for each action that you want to track with a <xref:System.ComponentModel.Design.DesignerTransaction>, call the <xref:System.ComponentModel.Design.IComponentChangeService.OnComponentChanging%2A> method, make the change or changes, then call the <xref:System.ComponentModel.Design.IComponentChangeService.OnComponentChanged%2A> method to signal that the change or changes have been made.

3. To complete the transaction, call <xref:System.ComponentModel.Design.DesignerTransaction.Commit%2A> from within a `finally` block.
3. To complete the transaction, call <xref:System.ComponentModel.Design.DesignerTransaction.Commit%2A> from within a `finally` block.

In C#, you can use the `using` statement rather than a `try/finally` block, such as in the following example.

```
```csharp
using (host.CreateTransaction() {
// Insert your code here.
}
```

To cancel and attempt to roll back a transaction before it has been committed, call the <xref:System.ComponentModel.Design.DesignerTransaction.Cancel%2A> method. When the <xref:System.ComponentModel.Design.DesignerTransaction.Cancel%2A> method is invoked, the actions tracked by the <xref:System.ComponentModel.Design.DesignerTransaction> are reversed to attempt to roll back the changes. To undo actions that occurred as part of earlier transactions, you must use the undo command provided by the development environment.



## Examples
The following code example program demonstrates how to create a <xref:System.ComponentModel.Design.DesignerTransaction> from a designer. To run this sample, compile the source code into a class library. You must add a reference to the System.Design assembly. In a new project, add a reference to the compiled DLL and add the component in the library to the **Toolbox**.

Expand Down
2 changes: 1 addition & 1 deletion xml/System.ComponentModel/ICustomTypeDescriptor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@

This method should return an object that you can use as follows:

```
```csharp
pd.GetValue(GetPropertyOwner(myPd));
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

The `system.identityModel` section must be specified in a `<section>` element under the `<configSections>` element in the configuration file or an exception is thrown.

```
```xml
<configSections>
<section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</configSections>
Expand Down Expand Up @@ -147,7 +147,7 @@

Both the `system.identityModel` section and the `system.identityModel.services` must be specified in a `<section>` elements under the `<configSections>` element in the configuration file or an exception is thrown.

```
```xml
<configSections>
<section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

To be used, the module must be added to the pipeline as in the following XML:

```
```xml
<configuration>
<system.webServer>
<modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@

The method parameters should have the same name and type as the parameters of the class binding constructor.

Use of this attribute does not have any affect on registration of the WMI class in the repository. It is only used at runtime.


Use of this attribute does not have any affect on registration of the WMI class in the repository. It is only used at run time.

## Examples
The following example demonstrates how to use the ManagementCreate attribute.

```
```csharp
[ManagementEntity]
public class ProcessInstance
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,20 @@
<Docs>
<summary>The ManagementEntity attribute indicates that a class provides management information exposed through a WMI provider.

Note: the WMI .NET libraries are now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The <see href="https://learn.microsoft.com/previous-versions/windows/desktop/wmi_v2/windows-management-infrastructure">MI APIs</see> should be used for all new development.</summary>
Note: The WMI .NET libraries are now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. Use the <see href="/windows/win32/api/_wmi_v2/">MI APIs</see> for all new development.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The class marked by this attribute must be public.



## Examples
The following example shows how to use the ManagementEntity attribute to mark a class.

```
// Use the ManagementEntity attribute on the class to specify that this // class contains management information that is available from
// provider.
The following example shows how to use the ManagementEntity attribute to mark a class.

[ManagementEntity(Name = "MortgageCalc")]
public class MortgageCalcWMIProvider
{
}
```csharp
[ManagementEntity(Name = "MortgageCalc")]
public class MortgageCalcWMIProvider { }
```

]]></format>
Expand Down Expand Up @@ -159,7 +153,7 @@
## Examples
In the following example, the Name parameter is used to set the name of the WMI class represented by the MortgageCalcWMIProvider class. It sets the name to MortgageCalculator. If the Name parameter is not used, the corresponding C# class name, MortgageCalcWMIProvider in this case, is used as the WMI class name.

```
```csharp
[ManagementEntity(Name = "MortgageCalculator")]
public class MortgageCalcWMIProvider
{
Expand Down Expand Up @@ -212,12 +206,12 @@ public class MortgageCalcWMIProvider
## Examples
The following code snippet demonstrates how to use the Singleton parameter to indicate that a C# class corresponds to a singleton WMI class.

```
```csharp
[ManagementEntity(Singleton=true)]
public class SingletonSample
public class SingletonSample { }
```

For a complete, working example of a provider that implements a singleton class, see [How to: Create a Basic Decoupled Provider](https://msdn.microsoft.com/library/1dabd442-c1ff-40a1-bb0e-d7b3566c2300).
For a complete, working example of a provider that implements a singleton class, see [How to: Create a Basic Decoupled Provider](/previous-versions/bb885134(v=vs.90)).

]]></format>
</remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
## Examples
In the following example, the integer parameter remains i internally, but will be exposed as "The Value" to WMI clients.

```
```csharp
[ManagementTask]
static public int PrintValue([ManagementName("The Value")]int i)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
## Examples
The following example demonstrates using the ManagementQualifier attribute to indicate that a class implements a WMI association class. In this case, the qualifier has a <xref:System.Management.Instrumentation.ManagementQualifierFlavors.DisableOverride> flavor that specifies that the effect of the qualifier cannot be overridden in subclasses.

```
```csharp
[ManagementQualifier("Association", Flavor = ManagementQualifierFlavors.DisableOverride)]
public class AssociationSample
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
## Examples
The following example demonstrates how to use the DisableOverride ManagementQualifierFlavors enumeration. Here it is being applied to the Association qualifier.

```
```csharp
[ManagementQualifier("Association",
Flavor = ManagementQualifierFlavors.DisableOverride)]
public class AssociationSampleBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

To compile the example, you will need to include references to both System.Management.Instrumentation and System.Configuration.Install. You must run installutil.exe against the resulting executable and ensure that the program is running in order to use the implemented WMI classes.

```
```csharp
using System;
using System.Collections;
using System.Management.Instrumentation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

## Examples

```
```csharp
// Specify that this assembly contains code that implements a WMI
// Provider. Use the assembly:WmiConfiguration attribute to define
// the WMI namespace, the hosting model, and the impersonation mode
Expand Down Expand Up @@ -129,7 +129,7 @@
## Examples
In the following example, the <xref:System.Management.Instrumentation.WmiConfigurationAttribute> is used to indicate that the assembly it is contained in implements an in-process provider that runs under the NetworkService security context and is hosted in a instance of the Wmiprvse.exe process that also hosts any other in-process providers in the same hosting group that also run within the NetworkService security context.

```
```csharp
[assembly: WmiConfiguration("root\\NVPair", HostingModel = ManagementHostingModel.NetworkService), HostingGroup = "MyProviders"]
```

Expand Down Expand Up @@ -179,13 +179,13 @@
## Examples
In the following example, the <xref:System.Management.Instrumentation.WmiConfigurationAttribute> is used to indicate that the assembly it is contained in implements a provider that is exposed through the root\NVPair namespace. Because the hosting model is not <xref:System.Management.Instrumentation.ManagementHostingModel.Decoupled>, it is an in-process provider. The value <xref:System.Management.Instrumentation.ManagementHostingModel.NetworkService> indicates that the in-process provider runs under the NetworkService security context.

```
```csharp
[assembly: WmiConfiguration("root\\NVPair", HostingModel = ManagementHostingModel.NetworkService)]
```

In the next example, the <xref:System.Management.Instrumentation.WmiConfigurationAttribute> is used to indicate that the assembly it is contained in implements a provider that is exposed through the root\NVPair namespace. The value <xref:System.Management.Instrumentation.ManagementHostingModel.Decoupled> indicates that it is a decoupled provider.

```
```csharp
[assembly: WmiConfiguration("root\\NVPair", HostingModel = ManagementHostingModel.Decoupled)]
```

Expand Down Expand Up @@ -231,7 +231,7 @@
## Examples
The following example demonstrates how to use the IdentifyLevel parameter to indicate that the provider can impersonate its callers.

```
```csharp
[assembly: WmiConfiguration("root/MyProv", HostingModel = ManagementHostingModel.Decoupled, IdentifyLevel = true]
```

Expand Down Expand Up @@ -277,7 +277,7 @@
## Examples
The following example demonstrates how to use the NamespaceSecurity parameter to set the security descriptor on the root/SDTest namespace in which the provider implemented in this assembly exposes WMI classes.

```
```csharp
[assembly: WmiConfiguration("root/SDTest", HostingModel = ManagementHostingModel.Decoupled, IdentifyLevel = false, NamespaceSecurity = "O:BAG:BAD:(A;CI;0x60003;;;WD)")]
```

Expand Down
Loading