Skip to content

Reorganize VB snippets in WindowsServer directory #11541

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
The following example demonstrates how to create a management event class by using the <xref:System.Management.Instrumentation.InstrumentationType> enumeration.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_InstrumentationType/cs/InstrumentationType.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_InstrumentationType/vb/InstrumentationType.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management.Instrumentation/InstrumentationType/Overview/InstrumentationType.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Management/CompletedEventArgs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
The following example calls a method asynchronously. The **Win32_Process.Create** method is called to create a new process for Calc.exe.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_CompletedEventArgs/cs/CompletedEventArgs.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_CompletedEventArgs/vb/CompletedEventArgs.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/CompletedEventArgs/Overview/CompletedEventArgs.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Management/CompletedEventHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
The following example calls a method asynchronously. The **Win32_Process.Create** method is called to create a new process for Calc.exe.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_CompletedEventHandler/cs/CompletedEventHandler.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_CompletedEventHandler/vb/CompletedEventHandler.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/CompletedEventHandler/Overview/CompletedEventHandler.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down
16 changes: 8 additions & 8 deletions xml/System.Management/ConnectionOptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
The following example connects to a remote computer and displays information about the operating system on the remote computer. A <xref:System.Management.ConnectionOptions> is created to connect to the remote computer with default connection options.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_ConnectionOptions/cs/ConnectionOptions.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_ConnectionOptions/vb/ConnectionOptions.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/ConnectionOptions/Overview/ConnectionOptions.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -75,7 +75,7 @@
The following example connects to a remote computer and displays information about the operating system on the remote computer. A <xref:System.Management.ConnectionOptions> is created to connect to the remote computer with default connection options.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_ConnectionOptions/cs/ConnectionOptions.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_ConnectionOptions/vb/ConnectionOptions.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/ConnectionOptions/Overview/ConnectionOptions.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -172,7 +172,7 @@
The following example connects to a remote computer and displays information about the operating system on the remote computer. A <xref:System.Management.ConnectionOptions> is created to connect to the remote computer with the desired connection options.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_ConnectionOptions-9/cs/ConnectionOptions-9.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_ConnectionOptions-9/vb/ConnectionOptions-9.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/ConnectionOptions/.ctor/ConnectionOptions-9.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -217,7 +217,7 @@
The following example connects to a remote computer and displays information about the operating system on the remote computer. A <xref:System.Management.ConnectionOptions> is created to connect to the remote computer with the desired connection options.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_ConnectionOptions_Authentication/cs/ConnectionOptions_Authentication.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_ConnectionOptions_Authentication/vb/ConnectionOptions_Authentication.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/ConnectionOptions/Authentication/ConnectionOptions_Authentication.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -275,7 +275,7 @@ NTLMDOMAIN:<domain name>
The following example connects to a remote computer and displays information about the operating system on the remote computer. A <xref:System.Management.ConnectionOptions> is created to connect to the remote computer with the desired connection options.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_ConnectionOptions_Authority/cs/ConnectionOptions_Authority.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_ConnectionOptions_Authority/vb/ConnectionOptions_Authority.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/ConnectionOptions/Authority/ConnectionOptions_Authority.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -391,7 +391,7 @@ NTLMDOMAIN:<domain name>
The following example connects to a remote computer and displays information about the operating system on the remote computer. A <xref:System.Management.ConnectionOptions> is created to connect to the remote computer with the desired connection options.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_ConnectionOptions_Impersonation/cs/ConnectionOptions_Impersonation.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_ConnectionOptions_Impersonation/vb/ConnectionOptions_Impersonation.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/ConnectionOptions/Impersonation/ConnectionOptions_Impersonation.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -436,7 +436,7 @@ NTLMDOMAIN:<domain name>
The following example connects to a remote computer and displays information about the operating system on the remote computer. A <xref:System.Management.ConnectionOptions> is created to connect to the remote computer with the desired connection options.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_ConnectionOptions_Locale/cs/ConnectionOptions_Locale.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_ConnectionOptions_Locale/vb/ConnectionOptions_Locale.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/ConnectionOptions/Locale/ConnectionOptions_Locale.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -549,7 +549,7 @@ A blank <xref:System.Security.SecureString> ("") specifies a valid zero-length p
The following example connects to a remote computer and displays information about the operating system on the remote computer. A <xref:System.Management.ConnectionOptions> is created to connect to the remote computer with the desired connection options.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_ConnectionOptions_UserName/cs/ConnectionOptions_Username.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_ConnectionOptions_UserName/vb/ConnectionOptions_Username.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/ConnectionOptions/Username/ConnectionOptions_Username.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down
12 changes: 6 additions & 6 deletions xml/System.Management/EnumerationOptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
The following example initializes an <xref:System.Management.EnumerationOptions> variable with an <xref:System.Management.EnumerationOptions> constructor and then gets all the instances of a WMI class and its subclasses.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EnumerationOptions/cs/EnumerationOptions.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EnumerationOptions/vb/EnumerationOptions.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EnumerationOptions/Overview/EnumerationOptions.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -75,7 +75,7 @@
The following example initializes an <xref:System.Management.EnumerationOptions> variable with an <xref:System.Management.EnumerationOptions> constructor and then gets all the instances of a WMI class and its subclasses.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EnumerationOptions/cs/EnumerationOptions.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EnumerationOptions/vb/EnumerationOptions.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EnumerationOptions/Overview/EnumerationOptions.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -141,7 +141,7 @@
The following example initializes an <xref:System.Management.EnumerationOptions> variable with an <xref:System.Management.EnumerationOptions> constructor and then gets all the instances of a WMI class and its subclasses.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EnumerationOptions-10/cs/EnumerationOptions-10.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EnumerationOptions-10/vb/EnumerationOptions-10.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EnumerationOptions/.ctor/EnumerationOptions-10.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -185,7 +185,7 @@
The following example initializes an <xref:System.Management.EnumerationOptions> variable with an <xref:System.Management.EnumerationOptions> constructor and then gets all the instances of a WMI class and its subclasses.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EnumerationOptions_BlockSize/cs/EnumerationOptions_BlockSize.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EnumerationOptions_BlockSize/vb/EnumerationOptions_BlockSize.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EnumerationOptions/BlockSize/EnumerationOptions_BlockSize.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -265,7 +265,7 @@
The following example initializes an <xref:System.Management.EnumerationOptions> variable with an <xref:System.Management.EnumerationOptions> constructor and then gets all the instances of a WMI class and its subclasses.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EnumerationOptions_DirectRead/cs/EnumerationOptions_DirectRead.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EnumerationOptions_DirectRead/vb/EnumerationOptions_DirectRead.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EnumerationOptions/DirectRead/EnumerationOptions_DirectRead.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -347,7 +347,7 @@
The following example initializes an <xref:System.Management.EnumerationOptions> variable with an <xref:System.Management.EnumerationOptions> constructor and then gets all the instances of a WMI class and its subclasses.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EnumerationOptions_EnumerateDeep/cs/EnumerationOptions_EnumerateDeep.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EnumerationOptions_EnumerateDeep/vb/EnumerationOptions_EnumerateDeep.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EnumerationOptions/EnumerateDeep/EnumerationOptions_EnumerateDeep.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Management/EventArrivedEventArgs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
The following asynchronous example sets up a WMI timer to raise an event every second, and removes it when no longer needed. The <xref:System.Management.ManagementEventWatcher> defines several .NET Framework events which are raised when WMI events are delivered. Delegates are attached to these events for handling the incoming data.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EventArrivedEventArgs/cs/EventArrivedEventArgs.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EventArrivedEventArgs/vb/EventArrivedEventArgs.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EventArrivedEventArgs/Overview/EventArrivedEventArgs.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Management/EventArrivedEventHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
The following asynchronous example sets up a WMI timer to raise an event every second, and removes it when no longer needed. The <xref:System.Management.ManagementEventWatcher> defines several .NET Framework events which are raised when WMI events are delivered. Delegates are attached to these events for handling the incoming data.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EventArrivedEventHandler/cs/EventArrivedEventHandler.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EventArrivedEventHandler/vb/EventArrivedEventHandler.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EventArrivedEventHandler/Overview/EventArrivedEventHandler.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down
8 changes: 4 additions & 4 deletions xml/System.Management/EventQuery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
The following example shows how the client receives notification when an instance of **Win32_Process** is created because the event class is **__InstanceCreationEvent**. For more information, see the [Windows Management Instrumentation](/windows/desktop/wmisdk/wmi-start-page) documentation. The client receives events synchronously by calling the <xref:System.Management.ManagementEventWatcher.WaitForNextEvent%2A> method. This example can be tested by starting a process, such as Notepad, while the example code is running.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EventQuery/cs/EventQuery.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EventQuery/vb/EventQuery.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EventQuery/Overview/EventQuery.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -75,7 +75,7 @@
The following example shows how the client receives notification when an instance of **Win32_Process** is created because the event class is **__InstanceCreationEvent**. For more information, see the [Windows Management Instrumentation](/windows/desktop/wmisdk/wmi-start-page) documentation. The client receives events synchronously by calling the <xref:System.Management.ManagementEventWatcher.WaitForNextEvent%2A> method. This example can be tested by starting a process, such as Notepad, while the example code is running.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EventQuery/cs/EventQuery.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EventQuery/vb/EventQuery.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EventQuery/Overview/EventQuery.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -116,7 +116,7 @@
The following example shows how the client receives notification when an instance of **Win32_Process** is created because the event class is **__InstanceCreationEvent**. For more information, see the [Windows Management Instrumentation](/windows/desktop/wmisdk/wmi-start-page) documentation. The client receives events synchronously by calling the <xref:System.Management.ManagementEventWatcher.WaitForNextEvent%2A> method. This example can be tested by starting a process, such as Notepad, while the example code is running.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EventQuery-1/cs/EventQuery-1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EventQuery-1/vb/EventQuery-1.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EventQuery/.ctor/EventQuery-1.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -159,7 +159,7 @@
The following example shows how the client receives notification when an instance of **Win32_Process** is created because the event class is **__InstanceCreationEvent**. For more information, see the [Windows Management Instrumentation](/windows/desktop/wmisdk/wmi-start-page) documentation. The client receives events synchronously by calling the <xref:System.Management.ManagementEventWatcher.WaitForNextEvent%2A> method. This example can be tested by starting a process, such as Notepad, while the example code is running.

:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WindowsServer/wminet_EventQuery-2/cs/EventQuery-2.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WindowsServer/wminet_EventQuery-2/vb/EventQuery-2.vb" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Management/EventQuery/.ctor/EventQuery-2.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down
Loading