>From d69ca96e0e42b3646acb4bdcff89c34da4f8a7fb Mon Sep 17 00:00:00 2001
From: Arnaud <arnaud.champion@devatom.fr>
Date: Wed, 8 Dec 2010 00:47:39 +0100
Subject: [PATCH] New sample virNetwork for network related samples

---
 examples/MonoDevelop/virNetworks/AssemblyInfo.cs   |   27 ++
 examples/MonoDevelop/virNetworks/Main.cs           |   17 +
 examples/MonoDevelop/virNetworks/MainWindow.cs     |  187 ++++++++++
 .../MonoDevelop/virNetworks/gtk-gui/MainWindow.cs  |  241 +++++++++++++
 .../MonoDevelop/virNetworks/gtk-gui/generated.cs   |   29 ++
 .../MonoDevelop/virNetworks/gtk-gui/gui.stetic     |  364 ++++++++++++++++++++
 .../MonoDevelop/virNetworks/virNetworks.csproj     |   63 ++++
 .../VisualStudio/virNetworkd/Form1.Designer.cs     |  237 +++++++++++++
 examples/VisualStudio/virNetworkd/Form1.cs         |  142 ++++++++
 examples/VisualStudio/virNetworkd/Form1.resx       |  120 +++++++
 examples/VisualStudio/virNetworkd/Program.cs       |   21 ++
 .../virNetworkd/Properties/AssemblyInfo.cs         |   36 ++
 .../virNetworkd/Properties/Resources.Designer.cs   |   71 ++++
 .../virNetworkd/Properties/Resources.resx          |  117 +++++++
 .../virNetworkd/Properties/Settings.Designer.cs    |   30 ++
 .../virNetworkd/Properties/Settings.settings       |    7 +
 .../VisualStudio/virNetworkd/virNetworks.csproj    |   93 +++++
 projects/MonoDevelop/LibvirtBindings.sln           |    9 +-
 projects/VisualStudio/LibvirtBindings.sln          |   13 +
 19 files changed, 1823 insertions(+), 1 deletions(-)
 create mode 100644 examples/MonoDevelop/virNetworks/AssemblyInfo.cs
 create mode 100644 examples/MonoDevelop/virNetworks/Main.cs
 create mode 100644 examples/MonoDevelop/virNetworks/MainWindow.cs
 create mode 100644 examples/MonoDevelop/virNetworks/gtk-gui/MainWindow.cs
 create mode 100644 examples/MonoDevelop/virNetworks/gtk-gui/generated.cs
 create mode 100644 examples/MonoDevelop/virNetworks/gtk-gui/gui.stetic
 create mode 100644 examples/MonoDevelop/virNetworks/virNetworks.csproj
 create mode 100644 examples/VisualStudio/virNetworkd/Form1.Designer.cs
 create mode 100644 examples/VisualStudio/virNetworkd/Form1.cs
 create mode 100644 examples/VisualStudio/virNetworkd/Form1.resx
 create mode 100644 examples/VisualStudio/virNetworkd/Program.cs
 create mode 100644 examples/VisualStudio/virNetworkd/Properties/AssemblyInfo.cs
 create mode 100644 examples/VisualStudio/virNetworkd/Properties/Resources.Designer.cs
 create mode 100644 examples/VisualStudio/virNetworkd/Properties/Resources.resx
 create mode 100644 examples/VisualStudio/virNetworkd/Properties/Settings.Designer.cs
 create mode 100644 examples/VisualStudio/virNetworkd/Properties/Settings.settings
 create mode 100644 examples/VisualStudio/virNetworkd/virNetworks.csproj

diff --git a/examples/MonoDevelop/virNetworks/AssemblyInfo.cs b/examples/MonoDevelop/virNetworks/AssemblyInfo.cs
new file mode 100644
index 0000000..b9356ea
--- /dev/null
+++ b/examples/MonoDevelop/virNetworks/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("virNetworks")]
+[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/virNetworks/Main.cs b/examples/MonoDevelop/virNetworks/Main.cs
new file mode 100644
index 0000000..f35571b
--- /dev/null
+++ b/examples/MonoDevelop/virNetworks/Main.cs
@@ -0,0 +1,17 @@
+using System;
+using Gtk;
+
+namespace virNetworks
+{
+	class MainClass
+	{
+		public static void Main (string[] args)
+		{
+			Application.Init ();
+			MainWindow win = new MainWindow ();
+			win.Show ();
+			Application.Run ();
+		}
+	}
+}
+
diff --git a/examples/MonoDevelop/virNetworks/MainWindow.cs b/examples/MonoDevelop/virNetworks/MainWindow.cs
new file mode 100644
index 0000000..d0fd8c6
--- /dev/null
+++ b/examples/MonoDevelop/virNetworks/MainWindow.cs
@@ -0,0 +1,187 @@
+/*
+ * 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 :
+ * Functions :
+ *      Connect.Open
+ *      Connect.ListNetworks
+ *      Connect.ListDefinedNetworks
+ *      Connect.NumOfNetworks
+ *      Connect.NumOfDefinedNetworks
+ *      Errors.GetLastError
+ *      Network.GetAutostart
+ *      Network.GetBridgeName
+ *      Network.GetXMLDesc
+ *      Network.IsActive
+ *      Network.IsPersistent
+ *      Network.LookupByName
+ *      Network.GetUUIDString
+ *      Network.SetAutostart
+ *
+ * Types :
+ *      Error
+ *      
+ */
+
+using System;
+using Gtk;
+using Libvirt;
+using System.Collections.Generic;
+using System.Xml.Linq;
+
+public partial class MainWindow : Gtk.Window
+{
+	private IntPtr _conn;
+	private IntPtr _network;
+	private ListStore _networkListStore;
+	
+	public MainWindow () : base(Gtk.WindowType.Toplevel)
+	{
+		Build ();
+		
+		_networkListStore = new ListStore(typeof(string));
+		CellRendererText cell = new CellRendererText();
+		cbNetworks.PackStart(cell, false);
+		cbNetworks.AddAttribute(cell, "text", 0);
+		cbNetworks.Model = _networkListStore;
+	}
+
+	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
+	{
+		Application.Quit ();
+		a.RetVal = true;
+	}
+	
+	protected virtual void OnBtnConnectClicked (object sender, System.EventArgs e)
+	{
+		_conn = Connect.Open(entryURI.Text);
+        if (_conn != IntPtr.Zero)
+        {
+			int nbActiveNetworks = Connect.NumOfNetworks(_conn);
+            if (nbActiveNetworks == -1)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+            int nbDefinedNetworks = Connect.NumOfDefinedNetworks(_conn);
+            if (nbDefinedNetworks == -1)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+            string[] activeNetworkNames = new string[nbActiveNetworks];
+            string[] definedNetworkNames = new string[nbDefinedNetworks];
+            int listActiveNetworks = Connect.ListNetworks(_conn, ref activeNetworkNames, nbActiveNetworks);
+            if (listActiveNetworks == -1)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+            int listDefinedNetworks = Connect.ListDefinedNetworks(_conn, ref definedNetworkNames, nbDefinedNetworks);
+            if (listDefinedNetworks == -1)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+            List<string> networks = new List<string>();
+            networks.AddRange(activeNetworkNames);
+            networks.AddRange(definedNetworkNames);
+			
+			foreach (string n in networks)
+				_networkListStore.AppendValues(n);
+			
+		}
+		else
+		{
+			Error error = Errors.GetLastError();
+            ShowError(error);
+		}
+	}
+	
+	private void ShowError(Error error)
+	{
+		MessageDialog errorMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Close, error.Message);
+        errorMsg.Title = "Error";
+		if ((ResponseType) errorMsg.Run() == ResponseType.Close)
+		{ 
+        	errorMsg.Destroy(); 
+		}
+	}
+	
+	protected virtual void OnCbNetworksChanged (object sender, System.EventArgs e)
+	{
+		_network = Network.LookupByName(_conn, cbNetworks.ActiveText);
+        if (_network != IntPtr.Zero)
+        {
+            int networkAutostart = 0;
+            int networkActive = Network.IsActive(_network);
+            if (networkActive == -1)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+            int networkPersistent = Network.IsPersistent(_network);
+            if (networkPersistent == -1)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+            int getAutostart = Network.GetAutostart(_network, ref networkAutostart);
+            if (getAutostart == -1)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+            string bridgeName = Network.GetBridgeName(_network);
+            if (bridgeName == null)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+            string UUIDString = Network.GetUUIDString(_network);
+            if (UUIDString == null)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+            string XMLDescription = Network.GetXMLDesc(_network, 0);
+            if (XMLDescription == null)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+
+            cbActive.Active = networkActive == 1;
+            cbPersistent.Active = networkPersistent == 1;
+            cbAutostart.Active = networkAutostart == 1;
+
+			eBridgeName.Text = bridgeName;
+            eUUID.Text = UUIDString;
+            XElement xDesc = XElement.Parse(XMLDescription);
+			tvDescription.Buffer.Text = xDesc.ToString();
+        }
+        else
+        {
+            Error error = Errors.GetLastError();
+            ShowError(error);
+        }
+	}
+	
+	protected virtual void OnCbAutostartToggled (object sender, System.EventArgs e)
+	{
+		int networkSetAutoStart = Network.SetAutostart(_network, cbAutostart.Active ? 1 : 0);
+        if (networkSetAutoStart == -1)
+        {
+            Error error = Errors.GetLastError();
+            ShowError(error);
+        }
+	}
+	
+	
+	
+}
+
diff --git a/examples/MonoDevelop/virNetworks/gtk-gui/MainWindow.cs b/examples/MonoDevelop/virNetworks/gtk-gui/MainWindow.cs
new file mode 100644
index 0000000..45cbe0d
--- /dev/null
+++ b/examples/MonoDevelop/virNetworks/gtk-gui/MainWindow.cs
@@ -0,0 +1,241 @@
+
+// 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 btnConnect;
+
+	private global::Gtk.ComboBox cbNetworks;
+
+	private global::Gtk.Entry eBridgeName;
+
+	private global::Gtk.Entry entryURI;
+
+	private global::Gtk.Entry eUUID;
+
+	private global::Gtk.ScrolledWindow GtkScrolledWindow;
+
+	private global::Gtk.TextView tvDescription;
+
+	private global::Gtk.Label label1;
+
+	private global::Gtk.Label label2;
+
+	private global::Gtk.Label label3;
+
+	private global::Gtk.Label label4;
+
+	private global::Gtk.Label label5;
+
+	private global::Gtk.Table table2;
+
+	private global::Gtk.CheckButton cbActive;
+
+	private global::Gtk.CheckButton cbAutostart;
+
+	private global::Gtk.CheckButton cbPersistent;
+
+	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)(8)), ((uint)(2)), false);
+		this.table1.Name = "table1";
+		this.table1.RowSpacing = ((uint)(6));
+		this.table1.ColumnSpacing = ((uint)(6));
+		// Container child table1.Gtk.Table+TableChild
+		this.btnConnect = new global::Gtk.Button ();
+		this.btnConnect.CanFocus = true;
+		this.btnConnect.Name = "btnConnect";
+		this.btnConnect.UseUnderline = true;
+		this.btnConnect.Label = global::Mono.Unix.Catalog.GetString ("Connect");
+		this.table1.Add (this.btnConnect);
+		global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(this.table1[this.btnConnect]));
+		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.cbNetworks = global::Gtk.ComboBox.NewText ();
+		this.cbNetworks.Name = "cbNetworks";
+		this.table1.Add (this.cbNetworks);
+		global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1[this.cbNetworks]));
+		w2.TopAttach = ((uint)(2));
+		w2.BottomAttach = ((uint)(3));
+		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.eBridgeName = new global::Gtk.Entry ();
+		this.eBridgeName.Sensitive = false;
+		this.eBridgeName.CanFocus = true;
+		this.eBridgeName.Name = "eBridgeName";
+		this.eBridgeName.IsEditable = true;
+		this.table1.Add (this.eBridgeName);
+		global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1[this.eBridgeName]));
+		w3.TopAttach = ((uint)(4));
+		w3.BottomAttach = ((uint)(5));
+		w3.LeftAttach = ((uint)(1));
+		w3.RightAttach = ((uint)(2));
+		w3.XOptions = ((global::Gtk.AttachOptions)(4));
+		w3.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.entryURI = new global::Gtk.Entry ();
+		this.entryURI.CanFocus = true;
+		this.entryURI.Name = "entryURI";
+		this.entryURI.Text = global::Mono.Unix.Catalog.GetString ("qemu+tcp://192.168.220.198/session");
+		this.entryURI.IsEditable = true;
+		this.table1.Add (this.entryURI);
+		global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1[this.entryURI]));
+		w4.LeftAttach = ((uint)(1));
+		w4.RightAttach = ((uint)(2));
+		w4.XOptions = ((global::Gtk.AttachOptions)(4));
+		w4.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.eUUID = new global::Gtk.Entry ();
+		this.eUUID.Sensitive = false;
+		this.eUUID.CanFocus = true;
+		this.eUUID.Name = "eUUID";
+		this.eUUID.IsEditable = true;
+		this.table1.Add (this.eUUID);
+		global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1[this.eUUID]));
+		w5.TopAttach = ((uint)(5));
+		w5.BottomAttach = ((uint)(6));
+		w5.LeftAttach = ((uint)(1));
+		w5.RightAttach = ((uint)(2));
+		w5.XOptions = ((global::Gtk.AttachOptions)(4));
+		w5.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.tvDescription = new global::Gtk.TextView ();
+		this.tvDescription.CanFocus = true;
+		this.tvDescription.Name = "tvDescription";
+		this.GtkScrolledWindow.Add (this.tvDescription);
+		this.table1.Add (this.GtkScrolledWindow);
+		global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow]));
+		w7.TopAttach = ((uint)(7));
+		w7.BottomAttach = ((uint)(8));
+		w7.LeftAttach = ((uint)(1));
+		w7.RightAttach = ((uint)(2));
+		w7.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 w8 = ((global::Gtk.Table.TableChild)(this.table1[this.label1]));
+		w8.XOptions = ((global::Gtk.AttachOptions)(4));
+		w8.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.label2 = new global::Gtk.Label ();
+		this.label2.Name = "label2";
+		this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Network :");
+		this.table1.Add (this.label2);
+		global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.label2]));
+		w9.TopAttach = ((uint)(2));
+		w9.BottomAttach = ((uint)(3));
+		w9.XOptions = ((global::Gtk.AttachOptions)(4));
+		w9.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.label3 = new global::Gtk.Label ();
+		this.label3.Name = "label3";
+		this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("Bridge name :");
+		this.table1.Add (this.label3);
+		global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1[this.label3]));
+		w10.TopAttach = ((uint)(4));
+		w10.BottomAttach = ((uint)(5));
+		w10.XOptions = ((global::Gtk.AttachOptions)(4));
+		w10.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.label4 = new global::Gtk.Label ();
+		this.label4.Name = "label4";
+		this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("UUID :");
+		this.table1.Add (this.label4);
+		global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.label4]));
+		w11.TopAttach = ((uint)(5));
+		w11.BottomAttach = ((uint)(6));
+		w11.XOptions = ((global::Gtk.AttachOptions)(4));
+		w11.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.label5 = new global::Gtk.Label ();
+		this.label5.Name = "label5";
+		this.label5.LabelProp = global::Mono.Unix.Catalog.GetString ("Description :");
+		this.table1.Add (this.label5);
+		global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.label5]));
+		w12.TopAttach = ((uint)(6));
+		w12.BottomAttach = ((uint)(7));
+		w12.XOptions = ((global::Gtk.AttachOptions)(4));
+		w12.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table1.Gtk.Table+TableChild
+		this.table2 = new global::Gtk.Table (((uint)(1)), ((uint)(3)), false);
+		this.table2.RowSpacing = ((uint)(6));
+		this.table2.ColumnSpacing = ((uint)(6));
+		// Container child table2.Gtk.Table+TableChild
+		this.cbActive = new global::Gtk.CheckButton ();
+		this.cbActive.Sensitive = false;
+		this.cbActive.CanFocus = true;
+		this.cbActive.Name = "cbActive";
+		this.cbActive.Label = global::Mono.Unix.Catalog.GetString ("Active");
+		this.cbActive.DrawIndicator = true;
+		this.cbActive.UseUnderline = true;
+		this.table2.Add (this.cbActive);
+		global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table2[this.cbActive]));
+		w13.LeftAttach = ((uint)(2));
+		w13.RightAttach = ((uint)(3));
+		w13.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table2.Gtk.Table+TableChild
+		this.cbAutostart = new global::Gtk.CheckButton ();
+		this.cbAutostart.CanFocus = true;
+		this.cbAutostart.Name = "cbAutostart";
+		this.cbAutostart.Label = global::Mono.Unix.Catalog.GetString ("Auto start");
+		this.cbAutostart.DrawIndicator = true;
+		this.cbAutostart.UseUnderline = true;
+		this.table2.Add (this.cbAutostart);
+		global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table2[this.cbAutostart]));
+		w14.YOptions = ((global::Gtk.AttachOptions)(4));
+		// Container child table2.Gtk.Table+TableChild
+		this.cbPersistent = new global::Gtk.CheckButton ();
+		this.cbPersistent.Sensitive = false;
+		this.cbPersistent.CanFocus = true;
+		this.cbPersistent.Name = "cbPersistent";
+		this.cbPersistent.Label = global::Mono.Unix.Catalog.GetString ("Persistent");
+		this.cbPersistent.DrawIndicator = true;
+		this.cbPersistent.UseUnderline = true;
+		this.table2.Add (this.cbPersistent);
+		global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table2[this.cbPersistent]));
+		w15.LeftAttach = ((uint)(1));
+		w15.RightAttach = ((uint)(2));
+		w15.YOptions = ((global::Gtk.AttachOptions)(4));
+		this.table1.Add (this.table2);
+		global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.table2]));
+		w16.TopAttach = ((uint)(3));
+		w16.BottomAttach = ((uint)(4));
+		w16.LeftAttach = ((uint)(1));
+		w16.RightAttach = ((uint)(2));
+		w16.XOptions = ((global::Gtk.AttachOptions)(4));
+		w16.YOptions = ((global::Gtk.AttachOptions)(4));
+		this.Add (this.table1);
+		if ((this.Child != null)) {
+			this.Child.ShowAll ();
+		}
+		this.DefaultWidth = 312;
+		this.DefaultHeight = 413;
+		this.Show ();
+		this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent);
+		this.cbAutostart.Toggled += new global::System.EventHandler (this.OnCbAutostartToggled);
+		this.cbNetworks.Changed += new global::System.EventHandler (this.OnCbNetworksChanged);
+		this.btnConnect.Clicked += new global::System.EventHandler (this.OnBtnConnectClicked);
+	}
+}
diff --git a/examples/MonoDevelop/virNetworks/gtk-gui/generated.cs b/examples/MonoDevelop/virNetworks/gtk-gui/generated.cs
new file mode 100644
index 0000000..8463caa
--- /dev/null
+++ b/examples/MonoDevelop/virNetworks/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/virNetworks/gtk-gui/gui.stetic b/examples/MonoDevelop/virNetworks/gtk-gui/gui.stetic
new file mode 100644
index 0000000..17e5426
--- /dev/null
+++ b/examples/MonoDevelop/virNetworks/gtk-gui/gui.stetic
@@ -0,0 +1,364 @@
+﻿<?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\virNetworks.exe" internal="true" />
+  </import>
+  <widget class="Gtk.Window" id="MainWindow" design-size="312 413">
+    <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">8</property>
+        <property name="NColumns">2</property>
+        <property name="RowSpacing">6</property>
+        <property name="ColumnSpacing">6</property>
+        <child>
+          <placeholder />
+        </child>
+        <child>
+          <placeholder />
+        </child>
+        <child>
+          <placeholder />
+        </child>
+        <child>
+          <placeholder />
+        </child>
+        <child>
+          <widget class="Gtk.Button" id="btnConnect">
+            <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="OnBtnConnectClicked" />
+          </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.ComboBox" id="cbNetworks">
+            <property name="MemberName" />
+            <property name="IsTextCombo">True</property>
+            <property name="Items" translatable="yes" />
+            <signal name="Changed" handler="OnCbNetworksChanged" />
+          </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="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="eBridgeName">
+            <property name="MemberName" />
+            <property name="Sensitive">False</property>
+            <property name="CanFocus">True</property>
+            <property name="IsEditable">True</property>
+          </widget>
+          <packing>
+            <property name="TopAttach">4</property>
+            <property name="BottomAttach">5</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="entryURI">
+            <property name="MemberName" />
+            <property name="CanFocus">True</property>
+            <property name="Text" translatable="yes">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.Entry" id="eUUID">
+            <property name="MemberName" />
+            <property name="Sensitive">False</property>
+            <property name="CanFocus">True</property>
+            <property name="IsEditable">True</property>
+          </widget>
+          <packing>
+            <property name="TopAttach">5</property>
+            <property name="BottomAttach">6</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.ScrolledWindow" id="GtkScrolledWindow">
+            <property name="MemberName" />
+            <property name="ShadowType">In</property>
+            <child>
+              <widget class="Gtk.TextView" id="tvDescription">
+                <property name="MemberName" />
+                <property name="CanFocus">True</property>
+                <property name="ShowScrollbars">True</property>
+                <property name="Text" translatable="yes" />
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="TopAttach">7</property>
+            <property name="BottomAttach">8</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>
+        <child>
+          <widget class="Gtk.Label" id="label2">
+            <property name="MemberName" />
+            <property name="LabelProp" translatable="yes">Network :</property>
+          </widget>
+          <packing>
+            <property name="TopAttach">2</property>
+            <property name="BottomAttach">3</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.Label" id="label3">
+            <property name="MemberName" />
+            <property name="LabelProp" translatable="yes">Bridge name :</property>
+          </widget>
+          <packing>
+            <property name="TopAttach">4</property>
+            <property name="BottomAttach">5</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.Label" id="label4">
+            <property name="MemberName" />
+            <property name="LabelProp" translatable="yes">UUID :</property>
+          </widget>
+          <packing>
+            <property name="TopAttach">5</property>
+            <property name="BottomAttach">6</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.Label" id="label5">
+            <property name="MemberName" />
+            <property name="LabelProp" translatable="yes">Description :</property>
+          </widget>
+          <packing>
+            <property name="TopAttach">6</property>
+            <property name="BottomAttach">7</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.Table" id="table2">
+            <property name="MemberName" />
+            <property name="NColumns">3</property>
+            <property name="RowSpacing">6</property>
+            <property name="ColumnSpacing">6</property>
+            <child>
+              <widget class="Gtk.CheckButton" id="cbActive">
+                <property name="MemberName" />
+                <property name="Sensitive">False</property>
+                <property name="CanFocus">True</property>
+                <property name="Label" translatable="yes">Active</property>
+                <property name="DrawIndicator">True</property>
+                <property name="HasLabel">True</property>
+                <property name="UseUnderline">True</property>
+              </widget>
+              <packing>
+                <property name="LeftAttach">2</property>
+                <property name="RightAttach">3</property>
+                <property name="AutoSize">True</property>
+                <property name="YOptions">Fill</property>
+                <property name="XExpand">True</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.CheckButton" id="cbAutostart">
+                <property name="MemberName" />
+                <property name="CanFocus">True</property>
+                <property name="Label" translatable="yes">Auto start</property>
+                <property name="DrawIndicator">True</property>
+                <property name="HasLabel">True</property>
+                <property name="UseUnderline">True</property>
+                <signal name="Toggled" handler="OnCbAutostartToggled" />
+              </widget>
+              <packing>
+                <property name="AutoSize">True</property>
+                <property name="YOptions">Fill</property>
+                <property name="XExpand">True</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.CheckButton" id="cbPersistent">
+                <property name="MemberName" />
+                <property name="Sensitive">False</property>
+                <property name="CanFocus">True</property>
+                <property name="Label" translatable="yes">Persistent</property>
+                <property name="DrawIndicator">True</property>
+                <property name="HasLabel">True</property>
+                <property name="UseUnderline">True</property>
+              </widget>
+              <packing>
+                <property name="LeftAttach">1</property>
+                <property name="RightAttach">2</property>
+                <property name="AutoSize">True</property>
+                <property name="YOptions">Fill</property>
+                <property name="XExpand">True</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>
+          <packing>
+            <property name="TopAttach">3</property>
+            <property name="BottomAttach">4</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>
+      </widget>
+    </child>
+  </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/examples/MonoDevelop/virNetworks/virNetworks.csproj b/examples/MonoDevelop/virNetworks/virNetworks.csproj
new file mode 100644
index 0000000..55610d3
--- /dev/null
+++ b/examples/MonoDevelop/virNetworks/virNetworks.csproj
@@ -0,0 +1,63 @@
+<?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>{90188B84-019D-4A75-9755-DA85D0E06607}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>virNetworks</RootNamespace>
+    <AssemblyName>virNetworks</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" />
+    <Reference Include="System.Xml.Linq">
+    </Reference>
+  </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/VisualStudio/virNetworkd/Form1.Designer.cs b/examples/VisualStudio/virNetworkd/Form1.Designer.cs
new file mode 100644
index 0000000..364fc10
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/Form1.Designer.cs
@@ -0,0 +1,237 @@
+﻿namespace virNetworkd
+{
+    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.btnConnect = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.tbURI = new System.Windows.Forms.TextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.cbActive = new System.Windows.Forms.CheckBox();
+            this.cbNetworks = new System.Windows.Forms.ComboBox();
+            this.cbPersistant = new System.Windows.Forms.CheckBox();
+            this.cbAutoStart = new System.Windows.Forms.CheckBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.tbBridgeName = new System.Windows.Forms.TextBox();
+            this.tbUUID = new System.Windows.Forms.TextBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.tbDescription = new System.Windows.Forms.TextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.groupBox1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // btnConnect
+            // 
+            this.btnConnect.Location = new System.Drawing.Point(197, 32);
+            this.btnConnect.Name = "btnConnect";
+            this.btnConnect.Size = new System.Drawing.Size(75, 23);
+            this.btnConnect.TabIndex = 17;
+            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, 9);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(32, 13);
+            this.label1.TabIndex = 16;
+            this.label1.Text = "URI :";
+            // 
+            // tbURI
+            // 
+            this.tbURI.Location = new System.Drawing.Point(77, 6);
+            this.tbURI.Name = "tbURI";
+            this.tbURI.Size = new System.Drawing.Size(195, 20);
+            this.tbURI.TabIndex = 15;
+            this.tbURI.Text = "qemu+tcp://192.168.220.198/session";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(6, 16);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(58, 13);
+            this.label2.TabIndex = 18;
+            this.label2.Text = "Networks :";
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.label5);
+            this.groupBox1.Controls.Add(this.tbDescription);
+            this.groupBox1.Controls.Add(this.label4);
+            this.groupBox1.Controls.Add(this.tbUUID);
+            this.groupBox1.Controls.Add(this.tbBridgeName);
+            this.groupBox1.Controls.Add(this.label3);
+            this.groupBox1.Controls.Add(this.cbAutoStart);
+            this.groupBox1.Controls.Add(this.cbPersistant);
+            this.groupBox1.Controls.Add(this.cbActive);
+            this.groupBox1.Controls.Add(this.cbNetworks);
+            this.groupBox1.Controls.Add(this.label2);
+            this.groupBox1.Location = new System.Drawing.Point(12, 61);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(260, 326);
+            this.groupBox1.TabIndex = 19;
+            this.groupBox1.TabStop = false;
+            // 
+            // cbActive
+            // 
+            this.cbActive.AutoSize = true;
+            this.cbActive.Enabled = false;
+            this.cbActive.Location = new System.Drawing.Point(198, 40);
+            this.cbActive.Name = "cbActive";
+            this.cbActive.Size = new System.Drawing.Size(56, 17);
+            this.cbActive.TabIndex = 20;
+            this.cbActive.Text = "Active";
+            this.cbActive.UseVisualStyleBackColor = true;
+            // 
+            // cbNetworks
+            // 
+            this.cbNetworks.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbNetworks.FormattingEnabled = true;
+            this.cbNetworks.Location = new System.Drawing.Point(70, 13);
+            this.cbNetworks.Name = "cbNetworks";
+            this.cbNetworks.Size = new System.Drawing.Size(184, 21);
+            this.cbNetworks.TabIndex = 19;
+            this.cbNetworks.SelectedIndexChanged += new System.EventHandler(this.cbNetworks_SelectedIndexChanged);
+            // 
+            // cbPersistant
+            // 
+            this.cbPersistant.AutoSize = true;
+            this.cbPersistant.Enabled = false;
+            this.cbPersistant.Location = new System.Drawing.Point(120, 40);
+            this.cbPersistant.Name = "cbPersistant";
+            this.cbPersistant.Size = new System.Drawing.Size(72, 17);
+            this.cbPersistant.TabIndex = 21;
+            this.cbPersistant.Text = "Persistent";
+            this.cbPersistant.UseVisualStyleBackColor = true;
+            // 
+            // cbAutoStart
+            // 
+            this.cbAutoStart.AutoSize = true;
+            this.cbAutoStart.Location = new System.Drawing.Point(43, 40);
+            this.cbAutoStart.Name = "cbAutoStart";
+            this.cbAutoStart.Size = new System.Drawing.Size(71, 17);
+            this.cbAutoStart.TabIndex = 22;
+            this.cbAutoStart.Text = "Auto start";
+            this.cbAutoStart.UseVisualStyleBackColor = true;
+            this.cbAutoStart.Click += new System.EventHandler(this.cbAutoStart_Click);
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(6, 66);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(72, 13);
+            this.label3.TabIndex = 23;
+            this.label3.Text = "Bridge name :";
+            // 
+            // tbBridgeName
+            // 
+            this.tbBridgeName.Location = new System.Drawing.Point(84, 63);
+            this.tbBridgeName.Name = "tbBridgeName";
+            this.tbBridgeName.ReadOnly = true;
+            this.tbBridgeName.Size = new System.Drawing.Size(170, 20);
+            this.tbBridgeName.TabIndex = 24;
+            // 
+            // tbUUID
+            // 
+            this.tbUUID.Location = new System.Drawing.Point(84, 89);
+            this.tbUUID.Name = "tbUUID";
+            this.tbUUID.ReadOnly = true;
+            this.tbUUID.Size = new System.Drawing.Size(170, 20);
+            this.tbUUID.TabIndex = 25;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(6, 92);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(40, 13);
+            this.label4.TabIndex = 26;
+            this.label4.Text = "UUID :";
+            // 
+            // tbDescription
+            // 
+            this.tbDescription.Location = new System.Drawing.Point(9, 140);
+            this.tbDescription.Multiline = true;
+            this.tbDescription.Name = "tbDescription";
+            this.tbDescription.ReadOnly = true;
+            this.tbDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+            this.tbDescription.Size = new System.Drawing.Size(245, 180);
+            this.tbDescription.TabIndex = 27;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(6, 124);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(66, 13);
+            this.label5.TabIndex = 28;
+            this.label5.Text = "Description :";
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(284, 397);
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.btnConnect);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.tbURI);
+            this.Name = "Form1";
+            this.Text = "Form1";
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button btnConnect;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox tbURI;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.ComboBox cbNetworks;
+        private System.Windows.Forms.CheckBox cbActive;
+        private System.Windows.Forms.CheckBox cbPersistant;
+        private System.Windows.Forms.CheckBox cbAutoStart;
+        private System.Windows.Forms.TextBox tbBridgeName;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.TextBox tbUUID;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox tbDescription;
+    }
+}
+
diff --git a/examples/VisualStudio/virNetworkd/Form1.cs b/examples/VisualStudio/virNetworkd/Form1.cs
new file mode 100644
index 0000000..dba7fd6
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/Form1.cs
@@ -0,0 +1,142 @@
+﻿/*
 * 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 :
 * Functions :
 *      Connect.Open
 *      Connect.ListNetworks
 *      Connect.ListDefinedNetworks
 *      Connect.NumOfNetworks
 *      Connect.NumOfDefinedNetworks
 *      Errors.GetLastError
 *      Network.GetAutostart
 *      Network.GetBridgeName
 *      Network.GetXMLDesc
 *      Network.IsActive
 *      Network.IsPersistent
 *      Network.LookupByName
 *      Network.GetUUIDString
 *      Network.SetAutostart
 *
 * Types :
 *      Error
 *      
 */
+
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using System.Xml.Linq;
+using Libvirt;
+
+namespace virNetworkd
+{
+    public partial class Form1 : Form
+    {
+        private IntPtr _conn;
+        private IntPtr _network;
+
+        public Form1()
+        {
+            InitializeComponent();
+        }
+
+        private void btnConnect_Click(object sender, EventArgs e)
+        {
+            _conn = Connect.Open(tbURI.Text);
+            if (_conn != IntPtr.Zero)
+            {
+                int nbActiveNetworks = Connect.NumOfNetworks(_conn);
+                if (nbActiveNetworks == -1)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+                int nbDefinedNetworks = Connect.NumOfDefinedNetworks(_conn);
+                if (nbDefinedNetworks == -1)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+                string[] activeNetworkNames = new string[nbActiveNetworks];
+                string[] definedNetworkNames = new string[nbDefinedNetworks];
+                int listActiveNetworks = Connect.ListNetworks(_conn, ref activeNetworkNames, nbActiveNetworks);
+                if (listActiveNetworks == -1)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+                int listDefinedNetworks = Connect.ListDefinedNetworks(_conn, ref definedNetworkNames, nbDefinedNetworks);
+                if (listDefinedNetworks == -1)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+                List<string> networks = new List<string>();
+                networks.AddRange(activeNetworkNames);
+                networks.AddRange(definedNetworkNames);
+
+                cbNetworks.DataSource = networks;
+            }
+            else
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+        }
+
+
+        private void cbNetworks_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            _network = Network.LookupByName(_conn, cbNetworks.Text);
+            if (_network != IntPtr.Zero)
+            {
+                int networkAutostart = 0;
+                int networkActive = Network.IsActive(_network);
+                if (networkActive == -1)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+                int networkPersistent = Network.IsPersistent(_network);
+                if (networkPersistent == -1)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+                int getAutostart = Network.GetAutostart(_network, ref networkAutostart);
+                if (getAutostart == -1)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+                string bridgeName = Network.GetBridgeName(_network);
+                if (bridgeName == null)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+                string UUIDString = Network.GetUUIDString(_network);
+                if (UUIDString == null)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+                string XMLDescription = Network.GetXMLDesc(_network, 0);
+                if (XMLDescription == null)
+                {
+                    Error error = Errors.GetLastError();
+                    ShowError(error);
+                }
+
+                cbActive.Checked = networkActive == 1;
+                cbPersistant.Checked = networkPersistent == 1;
+                cbAutoStart.Checked = networkAutostart == 1;
+
+                tbBridgeName.Text = bridgeName;
+                tbUUID.Text = UUIDString;
+                XElement xDesc = XElement.Parse(XMLDescription);
+
+                tbDescription.Text = xDesc.ToString();
+            }
+            else
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+        }
+
+        private void cbAutoStart_Click(object sender, EventArgs e)
+        {
+            int networkSetAutoStart = Network.SetAutostart(_network, cbAutoStart.Checked ? 1 : 0);
+            if (networkSetAutoStart == -1)
+            {
+                Error error = Errors.GetLastError();
+                ShowError(error);
+            }
+        }
+
+        private void ShowError(Error libvirtError)
+        {
+            string ErrorBoxMessage = string.Format("Error number : {0}. Error message : {1}", libvirtError.code, libvirtError.Message);
+            MessageBox.Show(ErrorBoxMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+        }
+    }
+}
diff --git a/examples/VisualStudio/virNetworkd/Form1.resx b/examples/VisualStudio/virNetworkd/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/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/virNetworkd/Program.cs b/examples/VisualStudio/virNetworkd/Program.cs
new file mode 100644
index 0000000..eaf78e4
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/Program.cs
@@ -0,0 +1,21 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+
+namespace virNetworkd
+{
+    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/virNetworkd/Properties/AssemblyInfo.cs b/examples/VisualStudio/virNetworkd/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..486c33e
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/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("virNetworkd")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("virNetworkd")]
+[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("5b6f3642-0890-4ddb-8ffd-57e4196c5e8d")]
+
+// 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/virNetworkd/Properties/Resources.Designer.cs b/examples/VisualStudio/virNetworkd/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..a265090
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/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 virNetworkd.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("virNetworkd.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/virNetworkd/Properties/Resources.resx b/examples/VisualStudio/virNetworkd/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/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/virNetworkd/Properties/Settings.Designer.cs b/examples/VisualStudio/virNetworkd/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..5f07a15
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/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 virNetworkd.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/virNetworkd/Properties/Settings.settings b/examples/VisualStudio/virNetworkd/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/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/examples/VisualStudio/virNetworkd/virNetworks.csproj b/examples/VisualStudio/virNetworkd/virNetworks.csproj
new file mode 100644
index 0000000..279b8b6
--- /dev/null
+++ b/examples/VisualStudio/virNetworkd/virNetworks.csproj
@@ -0,0 +1,93 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{058F58A1-1039-4CE3-B8E9-EB59685D0140}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>virNetworkd</RootNamespace>
+    <AssemblyName>virNetworkd</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <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="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <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. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file
diff --git a/projects/MonoDevelop/LibvirtBindings.sln b/projects/MonoDevelop/LibvirtBindings.sln
index a737c5a..9c56bb7 100644
--- a/projects/MonoDevelop/LibvirtBindings.sln
+++ b/projects/MonoDevelop/LibvirtBindings.sln
@@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virConnectSetErrorFunc", ".
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virDomainStats", "..\..\examples\MonoDevelop\virDomainStats\virDomainStats.csproj", "{767373FC-96BE-420A-8219-97146D33B2CB}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virNetworks", "..\..\examples\MonoDevelop\virNetworks\virNetworks.csproj", "{90188B84-019D-4A75-9755-DA85D0E06607}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -37,6 +39,10 @@ Global
 		{767373FC-96BE-420A-8219-97146D33B2CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{767373FC-96BE-420A-8219-97146D33B2CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{767373FC-96BE-420A-8219-97146D33B2CB}.Release|Any CPU.Build.0 = Release|Any CPU
+		{90188B84-019D-4A75-9755-DA85D0E06607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{90188B84-019D-4A75-9755-DA85D0E06607}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{90188B84-019D-4A75-9755-DA85D0E06607}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{90188B84-019D-4A75-9755-DA85D0E06607}.Release|Any CPU.Build.0 = Release|Any CPU
 		{C51C70EB-9040-4F8E-9A18-DF2A77D04A37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{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
@@ -52,8 +58,9 @@ Global
 		{4576BB61-F143-4BC8-BD1D-D50F710CEA10} = {504BA6A7-9D0E-44BA-827D-D797773347FD}
 		{243DD685-9AB3-4CD0-93D5-92034C1D97D8} = {504BA6A7-9D0E-44BA-827D-D797773347FD}
 		{767373FC-96BE-420A-8219-97146D33B2CB} = {504BA6A7-9D0E-44BA-827D-D797773347FD}
+		{90188B84-019D-4A75-9755-DA85D0E06607} = {504BA6A7-9D0E-44BA-827D-D797773347FD}
 	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = ..\..\examples\MonoDevelop\virDomainStats\virDomainStats.csproj
+		StartupItem = ..\..\examples\MonoDevelop\virNetworks\virNetworks.csproj
 	EndGlobalSection
 EndGlobal
diff --git a/projects/VisualStudio/LibvirtBindings.sln b/projects/VisualStudio/LibvirtBindings.sln
index 3606f4e..900e556 100644
--- a/projects/VisualStudio/LibvirtBindings.sln
+++ b/projects/VisualStudio/LibvirtBindings.sln
@@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virConnectSetErrorFunc", ".
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virDomainStats", "..\..\examples\VisualStudio\virDomainStats\virDomainStats.csproj", "{3BB761F4-FD1F-4089-9FBA-F84CA7452F6E}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "virNetworks", "..\..\examples\VisualStudio\virNetworkd\virNetworks.csproj", "{058F58A1-1039-4CE3-B8E9-EB59685D0140}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -85,6 +87,16 @@ Global
 		{3BB761F4-FD1F-4089-9FBA-F84CA7452F6E}.Release|Mixed Platforms.Build.0 = Release|x86
 		{3BB761F4-FD1F-4089-9FBA-F84CA7452F6E}.Release|x86.ActiveCfg = Release|x86
 		{3BB761F4-FD1F-4089-9FBA-F84CA7452F6E}.Release|x86.Build.0 = Release|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Debug|x86.ActiveCfg = Debug|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Debug|x86.Build.0 = Debug|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Release|Any CPU.ActiveCfg = Release|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Release|Mixed Platforms.Build.0 = Release|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Release|x86.ActiveCfg = Release|x86
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -95,5 +107,6 @@ Global
 		{E3319DF1-30AA-4B43-82A3-B66463F07305} = {AB0DC218-8ABA-4351-AD87-361AF7AF71C9}
 		{C528AE73-95C1-4D92-961F-3B35A55E3E30} = {AB0DC218-8ABA-4351-AD87-361AF7AF71C9}
 		{3BB761F4-FD1F-4089-9FBA-F84CA7452F6E} = {AB0DC218-8ABA-4351-AD87-361AF7AF71C9}
+		{058F58A1-1039-4CE3-B8E9-EB59685D0140} = {AB0DC218-8ABA-4351-AD87-361AF7AF71C9}
 	EndGlobalSection
 EndGlobal
-- 
1.7.2.3.msysgit.0

