From b921abe15909bc30e9bf2a6ea911934aac1296b1 Mon Sep 17 00:00:00 2001 From: Asugakoisi <51259305+Asugakoisi@users.noreply.github.com> Date: Wed, 18 Mar 2020 01:22:52 +0900 Subject: [PATCH 1/2] Change Snippet in transactedinstaller.cs --- .../CS/transactedinstaller.cs | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/samples/snippets/csharp/VS_Snippets_CLR/TransactedInstaller/CS/transactedinstaller.cs b/samples/snippets/csharp/VS_Snippets_CLR/TransactedInstaller/CS/transactedinstaller.cs index 14297e95c05..ff864a82e0a 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/TransactedInstaller/CS/transactedinstaller.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/TransactedInstaller/CS/transactedinstaller.cs @@ -15,6 +15,7 @@ If the '/?' or '/help' option is provided then the help information is printed to the console. */ +// using System; using System.ComponentModel; using System.Collections; @@ -23,12 +24,9 @@ printed to the console. public class TransactedInstaller_Example { +// public static void Main(String[] args) { -// -// -// -// ArrayList myOptions = new ArrayList(); String myOption; bool toUnInstall = false; @@ -73,13 +71,14 @@ public static void Main(String[] args) args[i]); return; } - +// // Create a instance of 'AssemblyInstaller' that installs the given assembly. myAssemblyInstaller = new AssemblyInstaller(args[i], (string[]) myOptions.ToArray(typeof(string))); // Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. - myTransactedInstaller.Installers.Add(myAssemblyInstaller); + myTransactedInstaller.Installers.Add(myAssemblyInstaller); +// } } // If user requested help or didn't provide any assemblies to install @@ -105,13 +104,9 @@ public static void Main(String[] args) catch(Exception e) { Console.WriteLine("\nException raised : {0}", e.Message); - } -// -// -// -// + } } - + public static void PrintHelpMessage() { Console.WriteLine("Usage : TransactedInstaller [/u | /uninstall] [option [...]] assembly" + @@ -120,4 +115,5 @@ public static void PrintHelpMessage() " the given assembly. If /u or /uninstall option" + " is given it uninstalls the assemblies."); } -} \ No newline at end of file +} +// From f5aedb4451dd1176dcc87f7c90d937148a840c88 Mon Sep 17 00:00:00 2001 From: Asugakoisi <51259305+Asugakoisi@users.noreply.github.com> Date: Sat, 21 Mar 2020 00:29:31 +0900 Subject: [PATCH 2/2] removed snippet2 --- .../TransactedInstaller/CS/transactedinstaller.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/snippets/csharp/VS_Snippets_CLR/TransactedInstaller/CS/transactedinstaller.cs b/samples/snippets/csharp/VS_Snippets_CLR/TransactedInstaller/CS/transactedinstaller.cs index ff864a82e0a..27f5210cc11 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/TransactedInstaller/CS/transactedinstaller.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/TransactedInstaller/CS/transactedinstaller.cs @@ -71,14 +71,13 @@ public static void Main(String[] args) args[i]); return; } -// + // Create a instance of 'AssemblyInstaller' that installs the given assembly. myAssemblyInstaller = new AssemblyInstaller(args[i], (string[]) myOptions.ToArray(typeof(string))); // Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller.Installers.Add(myAssemblyInstaller); -// } } // If user requested help or didn't provide any assemblies to install