>From 0b92dea54fa59f77aebc2e8d830f32cffd4a7013 Mon Sep 17 00:00:00 2001
From: Arnaud <arnaud.champion@devatom.fr>
Date: Wed, 20 Oct 2010 15:11:32 +0200
Subject: [PATCH] Rename classes from virConnect to Connect, etc...

---
 .gitignore                                         |    1 +
 virConnect.cs => Connect.cs                        |    4 +-
 virDomain.cs => Domain.cs                          |    4 +-
 LibvirtError.cs => Error.cs                        |    4 +-
 virEvent.cs => Event.cs                            |    4 +-
 virInterface.cs => Interface.cs                    |    4 +-
 virLibrary.cs => Library.cs                        |    4 +-
 MarshalHelper.cs                                   |    2 +-
 NativeFunctions.cs                                 |    2 +-
 virNetwork.cs => Network.cs                        |    4 +-
 virNode.cs => Node.cs                              |    4 +-
 virSecret.cs => Secret.cs                          |    4 +-
 virStoragePool.cs => StoragePool.cs                |    4 +-
 virStorageVol.cs => StorageVol.cs                  |    4 +-
 virStream.cs => Stream.cs                          |    4 +-
 StringWithoutNativeCleanUpMarshaler.cs             |    2 +-
 LibvirtTypes.cs => Types.cs                        |    2 +-
 .../MonoDevelop/virConnectOpen/AssemblyInfo.cs     |   27 +++++
 examples/MonoDevelop/virConnectOpen/Main.cs        |   17 +++
 examples/MonoDevelop/virConnectOpen/MainWindow.cs  |   66 +++++++++++
 .../virConnectOpen/gtk-gui/MainWindow.cs           |   90 ++++++++++++++
 .../virConnectOpen/gtk-gui/generated.cs            |   29 +++++
 .../MonoDevelop/virConnectOpen/gtk-gui/gui.stetic  |  122 ++++++++++++++++++++
 .../virConnectOpen/virConnectOpen.csproj           |   61 ++++++++++
 .../MonoDevelop/virConnectOpenAuth/MainWindow.cs   |   32 ++++--
 .../VisualStudio/virConnectOpen/Form1.Designer.cs  |  110 ++++++++++++++++++
 examples/VisualStudio/virConnectOpen/Form1.cs      |   54 +++++++++
 examples/VisualStudio/virConnectOpen/Form1.resx    |  120 +++++++++++++++++++
 examples/VisualStudio/virConnectOpen/Program.cs    |   21 ++++
 .../virConnectOpen/Properties/AssemblyInfo.cs      |   36 ++++++
 .../Properties/Resources.Designer.cs               |   71 +++++++++++
 .../virConnectOpen/Properties/Resources.resx       |  117 +++++++++++++++++++
 .../virConnectOpen/Properties/Settings.Designer.cs |   30 +++++
 .../virConnectOpen/Properties/Settings.settings    |    7 +
 .../virConnectOpen/virConnectOpen.csproj           |  101 ++++++++---------
 examples/VisualStudio/virConnectOpenAuth/Form1.cs  |   18 ++--
 projects/MonoDevelop/LibvirtBindings.csproj        |   60 +++++-----
 projects/MonoDevelop/LibvirtBindings.sln           |    9 ++-
 projects/VisualStudio/LibvirtBindings.csproj       |   66 ++++++------
 projects/VisualStudio/LibvirtBindings.sln          |   13 ++
 40 files changed, 1169 insertions(+), 165 deletions(-)
 rename virConnect.cs => Connect.cs (99%)
 rename virDomain.cs => Domain.cs (99%)
 rename LibvirtError.cs => Error.cs (99%)
 rename virEvent.cs => Event.cs (97%)
 rename virInterface.cs => Interface.cs (92%)
 rename virLibrary.cs => Library.cs (97%)
 rename virNetwork.cs => Network.cs (99%)
 rename virNode.cs => Node.cs (99%)
 rename virSecret.cs => Secret.cs (93%)
 rename virStoragePool.cs => StoragePool.cs (99%)
 rename virStorageVol.cs => StorageVol.cs (99%)
 rename virStream.cs => Stream.cs (93%)
 rename LibvirtTypes.cs => Types.cs (99%)
 create mode 100644 examples/MonoDevelop/virConnectOpen/AssemblyInfo.cs
 create mode 100644 examples/MonoDevelop/virConnectOpen/Main.cs
 create mode 100644 examples/MonoDevelop/virConnectOpen/MainWindow.cs
 create mode 100644 examples/MonoDevelop/virConnectOpen/gtk-gui/MainWindow.cs
 create mode 100644 examples/MonoDevelop/virConnectOpen/gtk-gui/generated.cs
 create mode 100644 examples/MonoDevelop/virConnectOpen/gtk-gui/gui.stetic
 create mode 100644 examples/MonoDevelop/virConnectOpen/virConnectOpen.csproj
 create mode 100644 examples/VisualStudio/virConnectOpen/Form1.Designer.cs
 create mode 100644 examples/VisualStudio/virConnectOpen/Form1.cs
 create mode 100644 examples/VisualStudio/virConnectOpen/Form1.resx
 create mode 100644 examples/VisualStudio/virConnectOpen/Program.cs
 create mode 100644 examples/VisualStudio/virConnectOpen/Properties/AssemblyInfo.cs
 create mode 100644 examples/VisualStudio/virConnectOpen/Properties/Resources.Designer.cs
 create mode 100644 examples/VisualStudio/virConnectOpen/Properties/Resources.resx
 create mode 100644 examples/VisualStudio/virConnectOpen/Properties/Settings.Designer.cs
 create mode 100644 examples/VisualStudio/virConnectOpen/Properties/Settings.settings
 copy projects/VisualStudio/LibvirtBindings.csproj => examples/VisualStudio/virConnectOpen/virConnectOpen.csproj (50%)

diff --git a/.gitignore b/.gitignore
index e94b014..382e47e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 
+*.pidb
 *.userprefs
 *.user
 _ReSharper*
diff --git a/virConnect.cs b/Connect.cs
similarity index 99%
rename from virConnect.cs
rename to Connect.cs
index 9d3c715..374af35 100644
--- a/virConnect.cs
+++ b/Connect.cs
@@ -9,9 +9,9 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virConnect
+    public class Connect
     {
         private const int MaxStringLength = 1024;
 
diff --git a/virDomain.cs b/Domain.cs
similarity index 99%
rename from virDomain.cs
rename to Domain.cs
index 913dcb9..cf83fc2 100644
--- a/virDomain.cs
+++ b/Domain.cs
@@ -9,9 +9,9 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virDomain
+    public class Domain
     {
         /// <summary>
         /// /// Create a virtual device attachment to backend. This function, having hotplug semantics, is only allowed on an active domain.
diff --git a/LibvirtError.cs b/Error.cs
similarity index 99%
rename from LibvirtError.cs
rename to Error.cs
index 0febfb5..8d424f2 100644
--- a/LibvirtError.cs
+++ b/Error.cs
@@ -10,12 +10,12 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
     ///<summary>
     /// class for libvirt errors binding
     ///</summary>
-    public class libvirtError
+    public class Error
     {
         /// <summary>
         /// The error object is kept in thread local storage, so separate threads can safely access this concurrently. 
diff --git a/virEvent.cs b/Event.cs
similarity index 97%
rename from virEvent.cs
rename to Event.cs
index 7aacfc2..821d2e1 100644
--- a/virEvent.cs
+++ b/Event.cs
@@ -8,9 +8,9 @@
 
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virEvent
+    public class Event
     {
         ///<summary>
         /// Function to install callbacks
diff --git a/virInterface.cs b/Interface.cs
similarity index 92%
rename from virInterface.cs
rename to Interface.cs
index 1902023..51d1f76 100644
--- a/virInterface.cs
+++ b/Interface.cs
@@ -6,9 +6,9 @@
  * See COPYING.LIB for the License of this software
  */
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virInterface
+    public class Interface
     {
         // TODO virInterfaceCreate
 
diff --git a/virLibrary.cs b/Library.cs
similarity index 97%
rename from virLibrary.cs
rename to Library.cs
index 465dc98..03f2038 100644
--- a/virLibrary.cs
+++ b/Library.cs
@@ -8,9 +8,9 @@
 
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virLibrary
+    public class Library
     {
         /// <summary>
         /// Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor 
diff --git a/MarshalHelper.cs b/MarshalHelper.cs
index 61d486a..bf622f7 100644
--- a/MarshalHelper.cs
+++ b/MarshalHelper.cs
@@ -12,7 +12,7 @@ using System.Linq;
 using System.Runtime.InteropServices;
 using System.Text;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
     public class MarshalHelper
     {
diff --git a/NativeFunctions.cs b/NativeFunctions.cs
index fc71647..25d7532 100644
--- a/NativeFunctions.cs
+++ b/NativeFunctions.cs
@@ -12,7 +12,7 @@ using System.Linq;
 using System.Runtime.InteropServices;
 using System.Text;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
     public class NativeFunctions
     {
diff --git a/virNetwork.cs b/Network.cs
similarity index 99%
rename from virNetwork.cs
rename to Network.cs
index 96ac5db..9c4bdff 100644
--- a/virNetwork.cs
+++ b/Network.cs
@@ -9,9 +9,9 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virNetwork
+    public class Network
     {
         /// <summary>
         /// Increment the reference count on the network. For each additional call to this method, 
diff --git a/virNode.cs b/Node.cs
similarity index 99%
rename from virNode.cs
rename to Node.cs
index a4198dd..0560cf5 100644
--- a/virNode.cs
+++ b/Node.cs
@@ -9,9 +9,9 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virNode
+    public class Node
     {
 		private const int MaxStringLength = 1024;
 		
diff --git a/virSecret.cs b/Secret.cs
similarity index 93%
rename from virSecret.cs
rename to Secret.cs
index fd3a2c6..34f38a0 100644
--- a/virSecret.cs
+++ b/Secret.cs
@@ -6,9 +6,9 @@
  * See COPYING.LIB for the License of this software
  */
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virSecret
+    public class Secret
     {
         // TODO virSecretDefineXML
 
diff --git a/virStoragePool.cs b/StoragePool.cs
similarity index 99%
rename from virStoragePool.cs
rename to StoragePool.cs
index 5df9be5..3952d5b 100644
--- a/virStoragePool.cs
+++ b/StoragePool.cs
@@ -9,9 +9,9 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virStoragePool
+    public class StoragePool
     {
 		private const int MaxStringLength = 1024;
 		
diff --git a/virStorageVol.cs b/StorageVol.cs
similarity index 99%
rename from virStorageVol.cs
rename to StorageVol.cs
index 18ebb5c..96ae2e9 100644
--- a/virStorageVol.cs
+++ b/StorageVol.cs
@@ -9,9 +9,9 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virStorageVol
+    public class StorageVol
     {
 
         /// <summary>
diff --git a/virStream.cs b/Stream.cs
similarity index 93%
rename from virStream.cs
rename to Stream.cs
index 52aa8ec..3b24543 100644
--- a/virStream.cs
+++ b/Stream.cs
@@ -6,9 +6,9 @@
  * See COPYING.LIB for the License of this software
  */
 
-namespace LibvirtBindings
+namespace Libvirt
 {
-    public class virStream
+    public class Stream
     {
         // TODO virStreamAbort
 
diff --git a/StringWithoutNativeCleanUpMarshaler.cs b/StringWithoutNativeCleanUpMarshaler.cs
index 28876fc..f429470 100644
--- a/StringWithoutNativeCleanUpMarshaler.cs
+++ b/StringWithoutNativeCleanUpMarshaler.cs
@@ -9,7 +9,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
     class StringWithoutNativeCleanUpMarshaler : ICustomMarshaler
     {
diff --git a/LibvirtTypes.cs b/Types.cs
similarity index 99%
rename from LibvirtTypes.cs
rename to Types.cs
index fa776e9..dfe8020 100644
--- a/LibvirtTypes.cs
+++ b/Types.cs
@@ -11,7 +11,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Runtime.InteropServices;
 
-namespace LibvirtBindings
+namespace Libvirt
 {
 
     #region delegates
diff --git a/examples/MonoDevelop/virConnectOpen/AssemblyInfo.cs b/examples/MonoDevelop/virConnectOpen/AssemblyInfo.cs
new file mode 100644
index 0000000..3e31205
--- /dev/null
+++ b/examples/MonoDevelop/virConnectOpen/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes. 
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("virConnectOpen")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly, 
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+
diff --git a/examples/MonoDevelop/virConnectOpen/Main.cs b/examples/MonoDevelop/virConnectOpen/Main.cs
new file mode 100644
index 0000000..71b217e
--- /dev/null
+++ b/examples/MonoDevelop/virConnectOpen/Main.cs
@@ -0,0 +1,17 @@
+using System;
+using Gtk;
+
+namespace virConnectOpen
+{
+	class MainClass
+	{
+		public static void Main (string[] args)
+		{
+			Application.Init ();
+			MainWindow win = new MainWindow ();
+			win.Show ();
+			Application.Run ();
+		}
+	}
+}
+
diff --git a/examples/MonoDevelop/virConnectOpen/MainWindow.cs b/examples/MonoDevelop/virConnectOpen/MainWindow.cs
new file mode 100644
index 0000000..849f99f
--- /dev/null
+++ b/examples/MonoDevelop/virConnectOpen/MainWindow.cs
@@ -0,0 +1,66 @@
+using System;
+using Gtk;
+using Libvirt;
+
+public partial class MainWindow : Gtk.Window
+{
+	ListStore StoragePoolListStore = new ListStore(typeof(string));
+	TreeViewColumn tvcStoragePools = new TreeViewColumn();
+	
+	public MainWindow () : base(Gtk.WindowType.Toplevel)
+	{
+		Build ();
+		
+		tvcStoragePools.Title = "Storage pools";
+		treeview1.AppendColumn(tvcStoragePools);
+		
+		treeview1.Model = StoragePoolListStore;
+	}
+
+	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
+	{
+		Application.Quit ();
+		a.RetVal = true;
+	}
+	
+	protected virtual void OnButton1Clicked (object sender, System.EventArgs e)
+	{
+		IntPtr conn = Connect.Open(entry1.Text);
+		
+		if (conn != IntPtr.Zero)
+        {
+            int numOfStoragePools = Connect.NumOfStoragePools(conn);
+            if (numOfStoragePools == -1)
+                ShowError("Unable to get the number of storage pools");
+            string[] storagePoolsNames = new string[numOfStoragePools];
+            int listStoragePools = Connect.ListStoragePools(conn, ref storagePoolsNames, numOfStoragePools);
+            if (listStoragePools == -1)
+                ShowError("Unable to list storage pools");
+            foreach (string storagePoolName in storagePoolsNames)
+                AddStoragePoolInTreeView(storagePoolName);
+        }
+        else
+        {
+            ShowError("Unable to connect");
+        }
+	}
+	
+	private void ShowError(string errorMessage)
+	{
+		MessageDialog errorMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Close, errorMessage);
+        errorMsg.Title = "Error";
+		if ((ResponseType) errorMsg.Run() == ResponseType.Close)
+		{ 
+        	errorMsg.Destroy(); 
+		}
+	}
+	
+	private void AddStoragePoolInTreeView(string storagePoolName)
+	{
+		StoragePoolListStore.AppendValues(storagePoolName);
+		CellRendererText crtStoragePoolCell = new CellRendererText();
+		tvcStoragePools.PackStart(crtStoragePoolCell, true);
+		tvcStoragePools.AddAttribute(crtStoragePoolCell, "text", 0);
+	}
+}
+
diff --git a/examples/MonoDevelop/virConnectOpen/gtk-gui/MainWindow.cs b/examples/MonoDevelop/virConnectOpen/gtk-gui/MainWindow.cs
new file mode 100644
index 0000000..e4a186f
--- /dev/null
+++ b/examples/MonoDevelop/virConnectOpen/gtk-gui/MainWindow.cs
@@ -0,0 +1,90 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+
+public partial class MainWindow
+{
+	private global::Gtk.Table table1;
+
+	private global::Gtk.Button button1;
+
+	private global::Gtk.Entry entry1;
+
+	private global::Gtk.ScrolledWindow GtkScrolledWindow;
+
+	private global::Gtk.TreeView treeview1;
+
+	private global::Gtk.Label label1;
+
+	protected virtual void Build ()
+	{
+		global::Stetic.Gui.Initialize (this);
+		// Widget MainWindow
+		this.Name = "MainWindow";
+		this.Title = global::Mono.Unix.Catalog.GetString ("MainWindow");
+		this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+		// Container child MainWindow.Gtk.Container+ContainerChild
+		this.table1 = new global::Gtk.Table (((uint)(3)), ((uint)(2)), false);
+		this.table1.Name = "table1";
+		this.table1.RowSpacing = ((uint)(6));
+		this.table1.ColumnSpacing = ((uint)(6));
+		// Container child table1.Gtk.Table+TableChild
+		this.button1 = new global::Gtk.Button ();
+		this.button1.CanFocus = true;
+		this.button1.Name = "button1";
+		this.button1.UseUnderline = true;
+		this.button1.Label = global::Mono.Unix.Catalog.GetString ("Connect");
+		this.table1.Add (this.button1);
+		global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(this.table1[this.button1]));
+		w1.TopAttach = ((uint)(1));
+		w1.BottomAttach = ((uint)(2));
+		w1.LeftAttach = ((uint)(1));
+		w1.RightAttach = ((uint)(2));
+		w1.XOptions = ((global::Gtk.AttachOptions)(4));
+		w1.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.entry1 = new global::Gtk.Entry ();
+		this.entry1.CanFocus = true;
+		this.entry1.Name = "entry1";
+		this.entry1.Text = "qemu+tcp://192.168.220.198/session";
+		this.entry1.IsEditable = true;
+		this.table1.Add (this.entry1);
+		global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1[this.entry1]));
+		w2.LeftAttach = ((uint)(1));
+		w2.RightAttach = ((uint)(2));
+		w2.XOptions = ((global::Gtk.AttachOptions)(4));
+		w2.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
+		this.GtkScrolledWindow.Name = "GtkScrolledWindow";
+		this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
+		// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
+		this.treeview1 = new global::Gtk.TreeView ();
+		this.treeview1.CanFocus = true;
+		this.treeview1.Name = "treeview1";
+		this.GtkScrolledWindow.Add (this.treeview1);
+		this.table1.Add (this.GtkScrolledWindow);
+		global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow]));
+		w4.TopAttach = ((uint)(2));
+		w4.BottomAttach = ((uint)(3));
+		w4.LeftAttach = ((uint)(1));
+		w4.RightAttach = ((uint)(2));
+		w4.XOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.label1 = new global::Gtk.Label ();
+		this.label1.Name = "label1";
+		this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("URI :");
+		this.table1.Add (this.label1);
+		global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1[this.label1]));
+		w5.XOptions = ((global::Gtk.AttachOptions)(4));
+		w5.YOptions = ((global::Gtk.AttachOptions)(4));
+		this.Add (this.table1);
+		if ((this.Child != null)) {
+			this.Child.ShowAll ();
+		}
+		this.DefaultWidth = 251;
+		this.DefaultHeight = 300;
+		this.Show ();
+		this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent);
+		this.button1.Clicked += new global::System.EventHandler (this.OnButton1Clicked);
+	}
+}
diff --git a/examples/MonoDevelop/virConnectOpen/gtk-gui/generated.cs b/examples/MonoDevelop/virConnectOpen/gtk-gui/generated.cs
new file mode 100644
index 0000000..8463caa
--- /dev/null
+++ b/examples/MonoDevelop/virConnectOpen/gtk-gui/generated.cs
@@ -0,0 +1,29 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace Stetic
+{
+	internal class Gui
+	{
+		private static bool initialized;
+
+		static internal void Initialize (Gtk.Widget iconRenderer)
+		{
+			if ((Stetic.Gui.initialized == false)) {
+				Stetic.Gui.initialized = true;
+			}
+		}
+	}
+
+	internal class ActionGroups
+	{
+		public static Gtk.ActionGroup GetActionGroup (System.Type type)
+		{
+			return Stetic.ActionGroups.GetActionGroup (type.FullName);
+		}
+
+		public static Gtk.ActionGroup GetActionGroup (string name)
+		{
+			return null;
+		}
+	}
+}
diff --git a/examples/MonoDevelop/virConnectOpen/gtk-gui/gui.stetic b/examples/MonoDevelop/virConnectOpen/gtk-gui/gui.stetic
new file mode 100644
index 0000000..132a592
--- /dev/null
+++ b/examples/MonoDevelop/virConnectOpen/gtk-gui/gui.stetic
@@ -0,0 +1,122 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+  <configuration>
+    <images-root-path>..</images-root-path>
+    <target-gtk-version>2.12</target-gtk-version>
+  </configuration>
+  <import>
+    <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <widget-library name="..\bin\Debug\virConnectOpen.exe" internal="true" />
+  </import>
+  <widget class="Gtk.Window" id="MainWindow" design-size="251 300">
+    <property name="MemberName" />
+    <property name="Title" translatable="yes">MainWindow</property>
+    <property name="WindowPosition">CenterOnParent</property>
+    <signal name="DeleteEvent" handler="OnDeleteEvent" />
+    <child>
+      <widget class="Gtk.Table" id="table1">
+        <property name="MemberName" />
+        <property name="NRows">3</property>
+        <property name="NColumns">2</property>
+        <property name="RowSpacing">6</property>
+        <property name="ColumnSpacing">6</property>
+        <child>
+          <placeholder />
+        </child>
+        <child>
+          <placeholder />
+        </child>
+        <child>
+          <widget class="Gtk.Button" id="button1">
+            <property name="MemberName" />
+            <property name="CanFocus">True</property>
+            <property name="Type">TextOnly</property>
+            <property name="Label" translatable="yes">Connect</property>
+            <property name="UseUnderline">True</property>
+            <signal name="Clicked" handler="OnButton1Clicked" />
+          </widget>
+          <packing>
+            <property name="TopAttach">1</property>
+            <property name="BottomAttach">2</property>
+            <property name="LeftAttach">1</property>
+            <property name="RightAttach">2</property>
+            <property name="AutoSize">True</property>
+            <property name="XOptions">Fill</property>
+            <property name="YOptions">Fill</property>
+            <property name="XExpand">False</property>
+            <property name="XFill">True</property>
+            <property name="XShrink">False</property>
+            <property name="YExpand">False</property>
+            <property name="YFill">True</property>
+            <property name="YShrink">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.Entry" id="entry1">
+            <property name="MemberName" />
+            <property name="CanFocus">True</property>
+            <property name="Text">qemu+tcp://192.168.220.198/session</property>
+            <property name="IsEditable">True</property>
+          </widget>
+          <packing>
+            <property name="LeftAttach">1</property>
+            <property name="RightAttach">2</property>
+            <property name="AutoSize">True</property>
+            <property name="XOptions">Fill</property>
+            <property name="YOptions">Fill</property>
+            <property name="XExpand">False</property>
+            <property name="XFill">True</property>
+            <property name="XShrink">False</property>
+            <property name="YExpand">False</property>
+            <property name="YFill">True</property>
+            <property name="YShrink">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+            <property name="MemberName" />
+            <property name="ShadowType">In</property>
+            <child>
+              <widget class="Gtk.TreeView" id="treeview1">
+                <property name="MemberName" />
+                <property name="CanFocus">True</property>
+                <property name="ShowScrollbars">True</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="TopAttach">2</property>
+            <property name="BottomAttach">3</property>
+            <property name="LeftAttach">1</property>
+            <property name="RightAttach">2</property>
+            <property name="AutoSize">True</property>
+            <property name="XOptions">Fill</property>
+            <property name="XExpand">False</property>
+            <property name="XFill">True</property>
+            <property name="XShrink">False</property>
+            <property name="YExpand">True</property>
+            <property name="YFill">True</property>
+            <property name="YShrink">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.Label" id="label1">
+            <property name="MemberName" />
+            <property name="LabelProp" translatable="yes">URI :</property>
+          </widget>
+          <packing>
+            <property name="AutoSize">True</property>
+            <property name="XOptions">Fill</property>
+            <property name="YOptions">Fill</property>
+            <property name="XExpand">False</property>
+            <property name="XFill">True</property>
+            <property name="XShrink">False</property>
+            <property name="YExpand">False</property>
+            <property name="YFill">True</property>
+            <property name="YShrink">False</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/examples/MonoDevelop/virConnectOpen/virConnectOpen.csproj b/examples/MonoDevelop/virConnectOpen/virConnectOpen.csproj
new file mode 100644
index 0000000..e0bbb1b
--- /dev/null
+++ b/examples/MonoDevelop/virConnectOpen/virConnectOpen.csproj
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{FFCD939E-7F9A-44D5-AEBC-84F40942E8B5}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>virConnectOpen</RootNamespace>
+    <AssemblyName>virConnectOpen</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="Mono.Posix" />
+    <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="gtk-gui\gui.stetic">
+      <LogicalName>gui.stetic</LogicalName>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="gtk-gui\generated.cs" />
+    <Compile Include="MainWindow.cs" />
+    <Compile Include="gtk-gui\MainWindow.cs" />
+    <Compile Include="Main.cs" />
+    <Compile Include="AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\projects\MonoDevelop\LibvirtBindings.csproj">
+      <Project>{C51C70EB-9040-4F8E-9A18-DF2A77D04A37}</Project>
+      <Name>LibvirtBindings</Name>
+    </ProjectReference>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs b/examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs
index c34c7db..cd56d30 100644
--- a/examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs
+++ b/examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs
@@ -1,6 +1,20 @@
+/*
+ * Copyright (C)
+ *   Arnaud Champion <arnaud.champion@devatom.fr>
+ *   Jaromír Červenka <cervajz@cervajz.com>
+ *
+ * See COPYING.LIB for the License of this software
+ * 
+ * Sample code for :
+ * Function :
+ *      virConnectOpen
+ *      virConnectNumOfStoragePools
+ *      virConnectListStoragePools
+ */
+
 using System;
 using Gtk;
-using LibvirtBindings;
+using Libvirt;
 using System.Runtime.InteropServices;
 
 public partial class MainWindow : Gtk.Window
@@ -47,14 +61,14 @@ public partial class MainWindow : Gtk.Window
         };
 		
 		// Request the connection
-        IntPtr conn = virConnect.OpenAuth(entry1.Text, ref auth, 0);
+        IntPtr conn = Connect.OpenAuth(entry1.Text, ref auth, 0);
 		
 		if (conn != IntPtr.Zero)
         {
             // Get the number of defined (not running) domains
-            int numOfDefinedDomains = virConnect.NumOfDefinedDomains(conn);
+            int numOfDefinedDomains = Connect.NumOfDefinedDomains(conn);
             string[] definedDomainNames = new string[numOfDefinedDomains];
-            if (virConnect.ListDefinedDomains(conn, ref definedDomainNames, numOfDefinedDomains) == -1)
+            if (Connect.ListDefinedDomains(conn, ref definedDomainNames, numOfDefinedDomains) == -1)
             {
 				ShowError("Unable to list defined domains");
                 return;
@@ -67,9 +81,9 @@ public partial class MainWindow : Gtk.Window
 			}
 			
             // Get the number of running domains
-            int numOfRunningDomain = virConnect.NumOfDomains(conn);
+            int numOfRunningDomain = Connect.NumOfDomains(conn);
             int[] runningDomainIDs = new int[numOfRunningDomain];
-            if (virConnect.ListDomains(conn, runningDomainIDs, numOfRunningDomain) == -1)
+            if (Connect.ListDomains(conn, runningDomainIDs, numOfRunningDomain) == -1)
             {
                 ShowError("Unable to list running domains");
                 return;
@@ -78,13 +92,13 @@ public partial class MainWindow : Gtk.Window
             // Add the domain names to the listbox
             foreach (int runningDomainID in runningDomainIDs)
             {
-                IntPtr domainPtr = virDomain.LookupByID(conn, runningDomainID);
+                IntPtr domainPtr = Domain.LookupByID(conn, runningDomainID);
                 if (domainPtr == IntPtr.Zero)
                 {
                     ShowError("Unable to lookup domains by id");
                     return;
                 }
-                string domainName = virDomain.GetName(domainPtr);
+                string domainName = Domain.GetName(domainPtr);
                 if (string.IsNullOrEmpty(domainName))
                 {
                     ShowError("Unable to get domain name");
@@ -92,7 +106,7 @@ public partial class MainWindow : Gtk.Window
                 }
                 AddDomainInTreeView(domainName);
             }
-            virConnect.Close(conn);
+            Connect.Close(conn);
         }
         else
         {
diff --git a/examples/VisualStudio/virConnectOpen/Form1.Designer.cs b/examples/VisualStudio/virConnectOpen/Form1.Designer.cs
new file mode 100644
index 0000000..39a5002
--- /dev/null
+++ b/examples/VisualStudio/virConnectOpen/Form1.Designer.cs
@@ -0,0 +1,110 @@
+﻿namespace virConnectOpen
+{
+    partial class Form1
+    {
+        /// <summary>
+        /// Variable nécessaire au concepteur.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Nettoyage des ressources utilisées.
+        /// </summary>
+        /// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Code généré par le Concepteur Windows Form
+
+        /// <summary>
+        /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
+        /// le contenu de cette méthode avec l'éditeur de code.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.gbDomains = new System.Windows.Forms.GroupBox();
+            this.lbStoragePool = new System.Windows.Forms.ListBox();
+            this.btnConnect = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.tbURI = new System.Windows.Forms.TextBox();
+            this.gbDomains.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // gbDomains
+            // 
+            this.gbDomains.Controls.Add(this.lbStoragePool);
+            this.gbDomains.Location = new System.Drawing.Point(15, 67);
+            this.gbDomains.Name = "gbDomains";
+            this.gbDomains.Size = new System.Drawing.Size(257, 131);
+            this.gbDomains.TabIndex = 15;
+            this.gbDomains.TabStop = false;
+            this.gbDomains.Text = "Storage Pools";
+            // 
+            // lbStoragePool
+            // 
+            this.lbStoragePool.FormattingEnabled = true;
+            this.lbStoragePool.Location = new System.Drawing.Point(6, 19);
+            this.lbStoragePool.Name = "lbStoragePool";
+            this.lbStoragePool.Size = new System.Drawing.Size(245, 95);
+            this.lbStoragePool.TabIndex = 0;
+            // 
+            // btnConnect
+            // 
+            this.btnConnect.Location = new System.Drawing.Point(197, 38);
+            this.btnConnect.Name = "btnConnect";
+            this.btnConnect.Size = new System.Drawing.Size(75, 23);
+            this.btnConnect.TabIndex = 14;
+            this.btnConnect.Text = "Connect";
+            this.btnConnect.UseVisualStyleBackColor = true;
+            this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(12, 15);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(32, 13);
+            this.label1.TabIndex = 9;
+            this.label1.Text = "URI :";
+            // 
+            // tbURI
+            // 
+            this.tbURI.Location = new System.Drawing.Point(77, 12);
+            this.tbURI.Name = "tbURI";
+            this.tbURI.Size = new System.Drawing.Size(195, 20);
+            this.tbURI.TabIndex = 8;
+            this.tbURI.Text = "qemu+tcp://192.168.220.198/session";
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(284, 262);
+            this.Controls.Add(this.gbDomains);
+            this.Controls.Add(this.btnConnect);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.tbURI);
+            this.Name = "Form1";
+            this.Text = "Form1";
+            this.gbDomains.ResumeLayout(false);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.GroupBox gbDomains;
+        private System.Windows.Forms.ListBox lbStoragePool;
+        private System.Windows.Forms.Button btnConnect;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox tbURI;
+    }
+}
+
diff --git a/examples/VisualStudio/virConnectOpen/Form1.cs b/examples/VisualStudio/virConnectOpen/Form1.cs
new file mode 100644
index 0000000..870b83d
--- /dev/null
+++ b/examples/VisualStudio/virConnectOpen/Form1.cs
@@ -0,0 +1,54 @@
+﻿/*
+ * Copyright (C)
+ *   Arnaud Champion <arnaud.champion@devatom.fr>
+ *   Jaromír Červenka <cervajz@cervajz.com>
+ *
+ * See COPYING.LIB for the License of this software
+ * 
+ * Sample code for :
+ * Function :
+ *      virConnectOpen
+ *      virConnectNumOfStoragePools
+ *      virConnectListStoragePools
+ */
+
+using System;
+using System.Windows.Forms;
+using Libvirt;
+
+namespace virConnectOpen
+{
+    public partial class Form1 : Form
+    {
+        public Form1()
+        {
+            InitializeComponent();
+        }
+
+        private void btnConnect_Click(object sender, EventArgs e)
+        {
+            IntPtr conn = Connect.Open(tbURI.Text);
+            if (conn != IntPtr.Zero)
+            {
+                int numOfStoragePools = Connect.NumOfStoragePools(conn);
+                if (numOfStoragePools == -1)
+                    ShowError("Unable to get the number of storage pools");
+                string[] storagePoolsNames = new string[numOfStoragePools];
+                int listStoragePools = Connect.ListStoragePools(conn, ref storagePoolsNames, numOfStoragePools);
+                if (listStoragePools == -1)
+                    ShowError("Unable to list storage pools");
+                foreach (string storagePoolName in storagePoolsNames)
+                    lbStoragePool.Items.Add(storagePoolName);
+            }
+            else
+            {
+                ShowError("Unable to connect");
+            }
+        }
+
+        private void ShowError(string message)
+        {
+            MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+        }
+    }
+}
diff --git a/examples/VisualStudio/virConnectOpen/Form1.resx b/examples/VisualStudio/virConnectOpen/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/examples/VisualStudio/virConnectOpen/Form1.resx
@@ -0,0 +1,120 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
diff --git a/examples/VisualStudio/virConnectOpen/Program.cs b/examples/VisualStudio/virConnectOpen/Program.cs
new file mode 100644
index 0000000..d7a5c6a
--- /dev/null
+++ b/examples/VisualStudio/virConnectOpen/Program.cs
@@ -0,0 +1,21 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+
+namespace virConnectOpen
+{
+    static class Program
+    {
+        /// <summary>
+        /// Point d'entrée principal de l'application.
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+        }
+    }
+}
diff --git a/examples/VisualStudio/virConnectOpen/Properties/AssemblyInfo.cs b/examples/VisualStudio/virConnectOpen/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..ccc552f
--- /dev/null
+++ b/examples/VisualStudio/virConnectOpen/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de 
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("virConnectOpen")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("virConnectOpen")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 
+// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de 
+// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
+[assembly: ComVisible(false)]
+
+// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
+[assembly: Guid("1dc70eef-7f01-4712-9060-d44bad25ea88")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+//      Version principale
+//      Version secondaire 
+//      Numéro de build
+//      Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/examples/VisualStudio/virConnectOpen/Properties/Resources.Designer.cs b/examples/VisualStudio/virConnectOpen/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..aa3dfa4
--- /dev/null
+++ b/examples/VisualStudio/virConnectOpen/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     Ce code a été généré par un outil.
+//     Version du runtime :4.0.30319.1
+//
+//     Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
+//     le code est régénéré.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace virConnectOpen.Properties
+{
+
+
+    /// <summary>
+    ///   Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
+    /// </summary>
+    // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
+    // à l'aide d'un outil, tel que ResGen ou Visual Studio.
+    // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
+    // avec l'option /str ou régénérez votre projet VS.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("virConnectOpen.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   Remplace la propriété CurrentUICulture du thread actuel pour toutes
+        ///   les recherches de ressources à l'aide de cette classe de ressource fortement typée.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}
diff --git a/examples/VisualStudio/virConnectOpen/Properties/Resources.resx b/examples/VisualStudio/virConnectOpen/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/examples/VisualStudio/virConnectOpen/Properties/Resources.resx
@@ -0,0 +1,117 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
diff --git a/examples/VisualStudio/virConnectOpen/Properties/Settings.Designer.cs b/examples/VisualStudio/virConnectOpen/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..b1d54a1
--- /dev/null
+++ b/examples/VisualStudio/virConnectOpen/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.1
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace virConnectOpen.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}
diff --git a/examples/VisualStudio/virConnectOpen/Properties/Settings.settings b/examples/VisualStudio/virConnectOpen/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/examples/VisualStudio/virConnectOpen/Properties/Settings.settings
@@ -0,0 +1,7 @@
+﻿<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>
diff --git a/projects/VisualStudio/LibvirtBindings.csproj b/examples/VisualStudio/virConnectOpen/virConnectOpen.csproj
similarity index 50%
copy from projects/VisualStudio/LibvirtBindings.csproj
copy to examples/VisualStudio/virConnectOpen/virConnectOpen.csproj
index bbb6ecd..a2ae3e7 100644
--- a/projects/VisualStudio/LibvirtBindings.csproj
+++ b/examples/VisualStudio/virConnectOpen/virConnectOpen.csproj
@@ -2,28 +2,30 @@
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
     <ProductVersion>8.0.30703</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{592FE0DB-C205-4934-BD20-79BDAB1584C1}</ProjectGuid>
-    <OutputType>Library</OutputType>
+    <ProjectGuid>{54F79BD5-8E81-4100-BD13-C63072D00B0B}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>LibvirtBindings</RootNamespace>
-    <AssemblyName>LibvirtBindings</AssemblyName>
+    <RootNamespace>virConnectOpen</RootNamespace>
+    <AssemblyName>virConnectOpen</AssemblyName>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
     <FileAlignment>512</FileAlignment>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <OutputPath>bin\Release\</OutputPath>
@@ -38,58 +40,47 @@
     <Reference Include="System.Data.DataSetExtensions" />
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="..\..\LibvirtError.cs">
-      <Link>LibvirtError.cs</Link>
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
     </Compile>
-    <Compile Include="..\..\LibvirtTypes.cs">
-      <Link>LibvirtTypes.cs</Link>
-    </Compile>
-    <Compile Include="..\..\MarshalHelper.cs">
-      <Link>MarshalHelper.cs</Link>
-    </Compile>
-    <Compile Include="..\..\NativeFunctions.cs">
-      <Link>NativeFunctions.cs</Link>
-    </Compile>
-    <Compile Include="..\..\StringWithoutNativeCleanUpMarshaler.cs">
-      <Link>StringWithoutNativeCleanUpMarshaler.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virConnect.cs">
-      <Link>virConnect.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virDomain.cs">
-      <Link>virDomain.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virEvent.cs">
-      <Link>virEvent.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virInterface.cs">
-      <Link>virInterface.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virLibrary.cs">
-      <Link>virLibrary.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virNetwork.cs">
-      <Link>virNetwork.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virNode.cs">
-      <Link>virNode.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virSecret.cs">
-      <Link>virSecret.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virStoragePool.cs">
-      <Link>virStoragePool.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virStorageVol.cs">
-      <Link>virStorageVol.cs</Link>
-    </Compile>
-    <Compile Include="..\..\virStream.cs">
-      <Link>virStream.cs</Link>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
     </Compile>
+    <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Form1.resx">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\projects\VisualStudio\LibvirtBindings.csproj">
+      <Project>{592FE0DB-C205-4934-BD20-79BDAB1584C1}</Project>
+      <Name>LibvirtBindings</Name>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
diff --git a/examples/VisualStudio/virConnectOpenAuth/Form1.cs b/examples/VisualStudio/virConnectOpenAuth/Form1.cs
index 6ba9f5a..497ed38 100644
--- a/examples/VisualStudio/virConnectOpenAuth/Form1.cs
+++ b/examples/VisualStudio/virConnectOpenAuth/Form1.cs
@@ -24,7 +24,7 @@
 using System;
 using System.Runtime.InteropServices;
 using System.Windows.Forms;
-using LibvirtBindings;
+using Libvirt;
 
 namespace virConnectOpenAuth
 {
@@ -59,14 +59,14 @@ namespace virConnectOpenAuth
             };
 
             // Request the connection
-            IntPtr conn = virConnect.OpenAuth(tbURI.Text, ref auth, 0);
+            IntPtr conn = Connect.OpenAuth(tbURI.Text, ref auth, 0);
 
             if (conn != IntPtr.Zero)
             {
                 // Get the number of defined (not running) domains
-                int numOfDefinedDomains = virConnect.NumOfDefinedDomains(conn);
+                int numOfDefinedDomains = Connect.NumOfDefinedDomains(conn);
                 string[] definedDomainNames = new string[numOfDefinedDomains];
-                if (virConnect.ListDefinedDomains(conn, ref definedDomainNames, numOfDefinedDomains) == -1)
+                if (Connect.ListDefinedDomains(conn, ref definedDomainNames, numOfDefinedDomains) == -1)
                 {
                    MessageBox.Show("Unable to list defined domains", "List defined domains failed", MessageBoxButtons.OK,
                                     MessageBoxIcon.Error);
@@ -78,9 +78,9 @@ namespace virConnectOpenAuth
                     lbDomains.Items.Add(domainName);
 
                 // Get the number of running domains
-                int numOfRunningDomain = virConnect.NumOfDomains(conn);
+                int numOfRunningDomain = Connect.NumOfDomains(conn);
                 int[] runningDomainIDs = new int[numOfRunningDomain];
-                if (virConnect.ListDomains(conn, runningDomainIDs, numOfRunningDomain) == -1)
+                if (Connect.ListDomains(conn, runningDomainIDs, numOfRunningDomain) == -1)
                 {
                     MessageBox.Show("Unable to list running domains", "List running domains failed", MessageBoxButtons.OK,
                                     MessageBoxIcon.Error);
@@ -90,14 +90,14 @@ namespace virConnectOpenAuth
                 // Add the domain names to the listbox
                 foreach (int runningDomainID in runningDomainIDs)
                 {
-                    IntPtr domainPtr = virDomain.LookupByID(conn, runningDomainID);
+                    IntPtr domainPtr = Domain.LookupByID(conn, runningDomainID);
                     if (domainPtr == IntPtr.Zero)
                     {
                         MessageBox.Show("Unable to lookup domains by id", "Lookup domain failed", MessageBoxButtons.OK,
                                     MessageBoxIcon.Error);
                         return;
                     }
-                    string domainName = virDomain.GetName(domainPtr);
+                    string domainName = Domain.GetName(domainPtr);
                     if (string.IsNullOrEmpty(domainName))
                     {
                         MessageBox.Show("Unable to get domain name", "Get domain name failed", MessageBoxButtons.OK,
@@ -106,7 +106,7 @@ namespace virConnectOpenAuth
                     }
                     lbDomains.Items.Add(domainName);
                 }
-                virConnect.Close(conn);
+                Connect.Close(conn);
             }
             else
             {
diff --git a/projects/MonoDevelop/LibvirtBindings.csproj b/projects/MonoDevelop/LibvirtBindings.csproj
index accacc8..d66036c 100644
--- a/projects/MonoDevelop/LibvirtBindings.csproj
+++ b/projects/MonoDevelop/LibvirtBindings.csproj
@@ -34,53 +34,53 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="AssemblyInfo.cs" />
-    <Compile Include="..\..\LibvirtError.cs">
-      <Link>LibvirtError.cs</Link>
-    </Compile>
-    <Compile Include="..\..\LibvirtTypes.cs">
-      <Link>LibvirtTypes.cs</Link>
-    </Compile>
     <Compile Include="..\..\StringWithoutNativeCleanUpMarshaler.cs">
       <Link>StringWithoutNativeCleanUpMarshaler.cs</Link>
     </Compile>
     <Compile Include="..\..\MarshalHelper.cs">
       <Link>MarshalHelper.cs</Link>
     </Compile>
-    <Compile Include="..\..\virConnect.cs">
-      <Link>virConnect.cs</Link>
+    <Compile Include="..\..\NativeFunctions.cs">
+      <Link>NativeFunctions.cs</Link>
+    </Compile>
+    <Compile Include="..\..\Connect.cs">
+      <Link>Connect.cs</Link>
     </Compile>
-    <Compile Include="..\..\virDomain.cs">
-      <Link>virDomain.cs</Link>
+    <Compile Include="..\..\Domain.cs">
+      <Link>Domain.cs</Link>
     </Compile>
-    <Compile Include="..\..\virEvent.cs">
-      <Link>virEvent.cs</Link>
+    <Compile Include="..\..\Error.cs">
+      <Link>Error.cs</Link>
     </Compile>
-    <Compile Include="..\..\virInterface.cs">
-      <Link>virInterface.cs</Link>
+    <Compile Include="..\..\Event.cs">
+      <Link>Event.cs</Link>
     </Compile>
-    <Compile Include="..\..\virLibrary.cs">
-      <Link>virLibrary.cs</Link>
+    <Compile Include="..\..\Interface.cs">
+      <Link>Interface.cs</Link>
     </Compile>
-    <Compile Include="..\..\virNetwork.cs">
-      <Link>virNetwork.cs</Link>
+    <Compile Include="..\..\Library.cs">
+      <Link>Library.cs</Link>
     </Compile>
-    <Compile Include="..\..\virNode.cs">
-      <Link>virNode.cs</Link>
+    <Compile Include="..\..\Network.cs">
+      <Link>Network.cs</Link>
     </Compile>
-    <Compile Include="..\..\virSecret.cs">
-      <Link>virSecret.cs</Link>
+    <Compile Include="..\..\Node.cs">
+      <Link>Node.cs</Link>
     </Compile>
-    <Compile Include="..\..\virStoragePool.cs">
-      <Link>virStoragePool.cs</Link>
+    <Compile Include="..\..\Secret.cs">
+      <Link>Secret.cs</Link>
     </Compile>
-    <Compile Include="..\..\virStorageVol.cs">
-      <Link>virStorageVol.cs</Link>
+    <Compile Include="..\..\StoragePool.cs">
+      <Link>StoragePool.cs</Link>
     </Compile>
-    <Compile Include="..\..\virStream.cs">
-      <Link>virStream.cs</Link>
+    <Compile Include="..\..\StorageVol.cs">
+      <Link>StorageVol.cs</Link>
     </Compile>
-    <Compile Include="..\..\NativeFunctions.cs">
-      <Link>NativeFunctions.cs</Link>
+    <Compile Include="..\..\Stream.cs">
+      <Link>Stream.cs</Link>
+    </Compile>
+    <Compile Include="..\..\Types.cs">
+      <Link>Types.cs</Link>
     </Compile>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
diff --git a/projects/MonoDevelop/LibvirtBindings.sln b/projects/MonoDevelop/LibvirtBindings.sln
index 135eaf3..aa07eb0 100644
--- a/projects/MonoDevelop/LibvirtBindings.sln
+++ b/projects/MonoDevelop/LibvirtBindings.sln
@@ -7,6 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{50
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virConnectOpenAuth", "..\..\examples\MonoDevelop\virConnectOpenAuth\virConnectOpenAuth.csproj", "{3259AE36-B12F-435E-9124-F6CAA781AD5C}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virConnectOpen", "..\..\examples\MonoDevelop\virConnectOpen\virConnectOpen.csproj", "{FFCD939E-7F9A-44D5-AEBC-84F40942E8B5}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -21,11 +23,16 @@ Global
 		{C51C70EB-9040-4F8E-9A18-DF2A77D04A37}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C51C70EB-9040-4F8E-9A18-DF2A77D04A37}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C51C70EB-9040-4F8E-9A18-DF2A77D04A37}.Release|Any CPU.Build.0 = Release|Any CPU
+		{FFCD939E-7F9A-44D5-AEBC-84F40942E8B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{FFCD939E-7F9A-44D5-AEBC-84F40942E8B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{FFCD939E-7F9A-44D5-AEBC-84F40942E8B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{FFCD939E-7F9A-44D5-AEBC-84F40942E8B5}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(NestedProjects) = preSolution
 		{3259AE36-B12F-435E-9124-F6CAA781AD5C} = {504BA6A7-9D0E-44BA-827D-D797773347FD}
+		{FFCD939E-7F9A-44D5-AEBC-84F40942E8B5} = {504BA6A7-9D0E-44BA-827D-D797773347FD}
 	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = ..\..\examples\MonoDevelop\virConnectOpenAuth\virConnectOpenAuth.csproj
+		StartupItem = ..\..\examples\MonoDevelop\virConnectOpen\virConnectOpen.csproj
 	EndGlobalSection
 EndGlobal
diff --git a/projects/VisualStudio/LibvirtBindings.csproj b/projects/VisualStudio/LibvirtBindings.csproj
index bbb6ecd..86a8914 100644
--- a/projects/VisualStudio/LibvirtBindings.csproj
+++ b/projects/VisualStudio/LibvirtBindings.csproj
@@ -8,7 +8,7 @@
     <ProjectGuid>{592FE0DB-C205-4934-BD20-79BDAB1584C1}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>LibvirtBindings</RootNamespace>
+    <RootNamespace>Libvirt</RootNamespace>
     <AssemblyName>LibvirtBindings</AssemblyName>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
@@ -41,53 +41,53 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="..\..\LibvirtError.cs">
-      <Link>LibvirtError.cs</Link>
+    <Compile Include="..\..\Connect.cs">
+      <Link>Connect.cs</Link>
     </Compile>
-    <Compile Include="..\..\LibvirtTypes.cs">
-      <Link>LibvirtTypes.cs</Link>
+    <Compile Include="..\..\Domain.cs">
+      <Link>Domain.cs</Link>
     </Compile>
-    <Compile Include="..\..\MarshalHelper.cs">
-      <Link>MarshalHelper.cs</Link>
+    <Compile Include="..\..\Error.cs">
+      <Link>Error.cs</Link>
     </Compile>
-    <Compile Include="..\..\NativeFunctions.cs">
-      <Link>NativeFunctions.cs</Link>
+    <Compile Include="..\..\Event.cs">
+      <Link>Event.cs</Link>
     </Compile>
-    <Compile Include="..\..\StringWithoutNativeCleanUpMarshaler.cs">
-      <Link>StringWithoutNativeCleanUpMarshaler.cs</Link>
+    <Compile Include="..\..\Interface.cs">
+      <Link>Interface.cs</Link>
     </Compile>
-    <Compile Include="..\..\virConnect.cs">
-      <Link>virConnect.cs</Link>
+    <Compile Include="..\..\Library.cs">
+      <Link>Library.cs</Link>
     </Compile>
-    <Compile Include="..\..\virDomain.cs">
-      <Link>virDomain.cs</Link>
+    <Compile Include="..\..\MarshalHelper.cs">
+      <Link>MarshalHelper.cs</Link>
     </Compile>
-    <Compile Include="..\..\virEvent.cs">
-      <Link>virEvent.cs</Link>
+    <Compile Include="..\..\NativeFunctions.cs">
+      <Link>NativeFunctions.cs</Link>
     </Compile>
-    <Compile Include="..\..\virInterface.cs">
-      <Link>virInterface.cs</Link>
+    <Compile Include="..\..\Network.cs">
+      <Link>Network.cs</Link>
     </Compile>
-    <Compile Include="..\..\virLibrary.cs">
-      <Link>virLibrary.cs</Link>
+    <Compile Include="..\..\Node.cs">
+      <Link>Node.cs</Link>
     </Compile>
-    <Compile Include="..\..\virNetwork.cs">
-      <Link>virNetwork.cs</Link>
+    <Compile Include="..\..\Secret.cs">
+      <Link>Secret.cs</Link>
     </Compile>
-    <Compile Include="..\..\virNode.cs">
-      <Link>virNode.cs</Link>
+    <Compile Include="..\..\StoragePool.cs">
+      <Link>StoragePool.cs</Link>
     </Compile>
-    <Compile Include="..\..\virSecret.cs">
-      <Link>virSecret.cs</Link>
+    <Compile Include="..\..\StorageVol.cs">
+      <Link>StorageVol.cs</Link>
     </Compile>
-    <Compile Include="..\..\virStoragePool.cs">
-      <Link>virStoragePool.cs</Link>
+    <Compile Include="..\..\Stream.cs">
+      <Link>Stream.cs</Link>
     </Compile>
-    <Compile Include="..\..\virStorageVol.cs">
-      <Link>virStorageVol.cs</Link>
+    <Compile Include="..\..\StringWithoutNativeCleanUpMarshaler.cs">
+      <Link>StringWithoutNativeCleanUpMarshaler.cs</Link>
     </Compile>
-    <Compile Include="..\..\virStream.cs">
-      <Link>virStream.cs</Link>
+    <Compile Include="..\..\Types.cs">
+      <Link>Types.cs</Link>
     </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
diff --git a/projects/VisualStudio/LibvirtBindings.sln b/projects/VisualStudio/LibvirtBindings.sln
index e167b62..173577c 100644
--- a/projects/VisualStudio/LibvirtBindings.sln
+++ b/projects/VisualStudio/LibvirtBindings.sln
@@ -7,6 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{AB
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virConnectOpenAuth", "..\..\examples\VisualStudio\virConnectOpenAuth\virConnectOpenAuth.csproj", "{F88B2E89-C3E6-4C69-881B-EB2AB4DE6CB3}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virConnectOpen", "..\..\examples\VisualStudio\virConnectOpen\virConnectOpen.csproj", "{54F79BD5-8E81-4100-BD13-C63072D00B0B}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -37,11 +39,22 @@ Global
 		{F88B2E89-C3E6-4C69-881B-EB2AB4DE6CB3}.Release|Mixed Platforms.Build.0 = Release|x86
 		{F88B2E89-C3E6-4C69-881B-EB2AB4DE6CB3}.Release|x86.ActiveCfg = Release|x86
 		{F88B2E89-C3E6-4C69-881B-EB2AB4DE6CB3}.Release|x86.Build.0 = Release|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Debug|x86.ActiveCfg = Debug|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Debug|x86.Build.0 = Debug|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Release|Any CPU.ActiveCfg = Release|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Release|Mixed Platforms.Build.0 = Release|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Release|x86.ActiveCfg = Release|x86
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
 	GlobalSection(NestedProjects) = preSolution
 		{F88B2E89-C3E6-4C69-881B-EB2AB4DE6CB3} = {AB0DC218-8ABA-4351-AD87-361AF7AF71C9}
+		{54F79BD5-8E81-4100-BD13-C63072D00B0B} = {AB0DC218-8ABA-4351-AD87-361AF7AF71C9}
 	EndGlobalSection
 EndGlobal
-- 
1.7.2.3.msysgit.0

