<commit_before>// Author: <NAME> <<EMAIL>>
//
// Copyright (c) 2009 Novell, Inc.

namespace GtkSharp {

	using Gtk;
	using System;
	using System.Runtime.InteropServices;

	public class InstantiationTest : Gtk.Window  {

		[DllImport ("libgobject-2.0.so.0")]
		static extern IntPtr g_object_new (IntPtr gtype, string prop, string val, IntPtr dummy);

		[DllImport ("libgtk-3.0.so.0")]
		static extern void gtk_widget_show (IntPtr handle);

		public static int Main (string[] args)
		{
			Application.Init ();
			GLib.GType gtype = LookupGType (typeof (InstantiationTest));
			GLib.GType.Register (gtype, typeof (InstantiationTest));
			Console.WriteLine ("Instantiating using managed constructor");
			new InstantiationTest ("Managed Instantiation Test").ShowAll ();
			Console.WriteLine ("Managed Instantiation complete");
			Console.WriteLine ("Instantiating using unmanaged construction");
			IntPtr handle = g_object_new (gtype.Val, "title", "Unmanaged Instantiation Test", IntPtr.Zero);
			gtk_widget_show (handle);
			Console.WriteLine ("Unmanaged Instantiation complete");
			Application.Run ();
			return 0;
		}


		public InstantiationTest (IntPtr raw) : base (raw)
		{
			Console.WriteLine ("IntPtr ctor invoked");
			DefaultWidth = 400;
			DefaultHeight = 200;
		}

		public InstantiationTest (string title) : base (title)
		{
			DefaultWidth = 200;
			DefaultHeight = 400;
		}

		protected override bool OnDeleteEvent (Gdk.Event ev)
		{
			Application.Quit ();
			return true;
		}

	}
}
<commit_msg>Fix NativeInstantiation sample/test * sample/NativeInstantiationTest.cs: pinvoke the correct soname.<commit_after>// Author: <NAME> <<EMAIL>>
//
// Copyright (c) 2009 Novell, Inc.

namespace GtkSharp {

	using Gtk;
	using System;
	using System.Runtime.InteropServices;

	public class InstantiationTest : Gtk.Window  {

		[DllImport ("libgobject-2.0.so.0")]
		static extern IntPtr g_object_new (IntPtr gtype, string prop, string val, IntPtr dummy);

		[DllImport ("libgtk-3.so.0")]
		static extern void gtk_widget_show (IntPtr handle);

		public static int Main (string[] args)
		{
			Application.Init ();
			GLib.GType gtype = LookupGType (typeof (InstantiationTest));
			GLib.GType.Register (gtype, typeof (InstantiationTest));
			Console.WriteLine ("Instantiating using managed constructor");
			new InstantiationTest ("Managed Instantiation Test").ShowAll ();
			Console.WriteLine ("Managed Instantiation complete");
			Console.WriteLine ("Instantiating using unmanaged construction");
			IntPtr handle = g_object_new (gtype.Val, "title", "Unmanaged Instantiation Test", IntPtr.Zero);
			gtk_widget_show (handle);
			Console.WriteLine ("Unmanaged Instantiation complete");
			Application.Run ();
			return 0;
		}


		public InstantiationTest (IntPtr raw) : base (raw)
		{
			Console.WriteLine ("IntPtr ctor invoked");
			DefaultWidth = 400;
			DefaultHeight = 200;
		}

		public InstantiationTest (string title) : base (title)
		{
			DefaultWidth = 200;
			DefaultHeight = 400;
		}

		protected override bool OnDeleteEvent (Gdk.Event ev)
		{
			Application.Quit ();
			return true;
		}

	}
}

{'fraction_non_alphanumeric': 0.11497584541062802, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 4.159468438538206, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3497772', 'n_tokens_mistral': 1131, 'n_tokens_neox': 944, 'n_words': 265}