Author: twiest
Date: 2007-02-08 21:08:33 -0500 (Thu, 08 Feb 2007)
New Revision: 72529

Added:
   trunk/wbem-sharp/samples/advanced/AdvancedCreateClass.cs
Modified:
   trunk/wbem-sharp/
   trunk/wbem-sharp/doc/
   trunk/wbem-sharp/samples/
   trunk/wbem-sharp/src/
Log:
* Added AdvancedCreateClass.cs
* Added svn:ignore properties to ignore bin and obj dirs.


Property changes on: trunk/wbem-sharp
___________________________________________________________________
Name: svn:ignore
   + *.suo



Property changes on: trunk/wbem-sharp/doc
___________________________________________________________________
Name: svn:ignore
   + wbem-sharp.xml



Property changes on: trunk/wbem-sharp/samples
___________________________________________________________________
Name: svn:ignore
   + obj
bin


Added: trunk/wbem-sharp/samples/advanced/AdvancedCreateClass.cs
===================================================================
--- trunk/wbem-sharp/samples/advanced/AdvancedCreateClass.cs    2007-02-09 
00:27:28 UTC (rev 72528)
+++ trunk/wbem-sharp/samples/advanced/AdvancedCreateClass.cs    2007-02-09 
02:08:33 UTC (rev 72529)
@@ -0,0 +1,32 @@
+using System;
+using Wbem;
+
+namespace WbemSamples
+{
+    class AdvancedCreateClass
+    {
+        public static void Main(string[] args)
+        {
+            // This first part is to simply setup the connection to the Cimom
+            string progName = System.AppDomain.CurrentDomain.FriendlyName;
+            if (args.Length != 4)
+            {
+                Console.WriteLine("Usage: " + progName + " <server name> 
<username> <password> <namespace>");
+                return;
+            }
+            string host = args[0];
+            string user = args[1];
+            string pwd = args[2];
+            string defaultNamespace = args[3];
+
+            // This is the line that defines our wbem client. No connection is 
made
+            // to the Cimom until a call is made.
+            WbemClient client = new WbemClient(host, user, pwd, 
defaultNamespace);
+
+            // Connect to the cimom and create the CIM_Dummy class
+            Console.Write("Creating Class: CIM_Dummy... ");
+            client.CreateClass(new CimClass("CIM_Dummy"));
+            Console.WriteLine("Done.\n");
+        }
+    }
+}
\ No newline at end of file


Property changes on: trunk/wbem-sharp/src
___________________________________________________________________
Name: svn:ignore
   + bin
obj


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to