Exemplo n.º 1
0
		public MemoryOutputStream (IntPtr data, ulong len, GLib.ReallocFunc realloc_fn, GLib.DestroyNotify destroy) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (MemoryOutputStream)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			GLibSharp.ReallocFuncWrapper realloc_fn_wrapper = new GLibSharp.ReallocFuncWrapper (realloc_fn);
			Raw = g_memory_output_stream_new(data, new UIntPtr (len), realloc_fn_wrapper.NativeDelegate, destroy);
		}
Exemplo n.º 2
0
 public MemoryOutputStream(IntPtr data, ulong len, GLib.ReallocFunc realloc_fn, GLib.DestroyNotify destroy) : base(IntPtr.Zero)
 {
     if (GetType() != typeof(MemoryOutputStream))
     {
         throw new InvalidOperationException("Can't override this constructor.");
     }
     GLibSharp.ReallocFuncWrapper realloc_fn_wrapper = new GLibSharp.ReallocFuncWrapper(realloc_fn);
     Raw = g_memory_output_stream_new(data, new UIntPtr(len), realloc_fn_wrapper.NativeDelegate, destroy);
 }
Exemplo n.º 3
0
		public MemoryOutputStream (IntPtr data, ulong size, GLib.ReallocFunc realloc_function, GLib.DestroyNotify destroy_function) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (MemoryOutputStream)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("data");
				vals.Add (new GLib.Value (data));
				names.Add ("size");
				vals.Add (new GLib.Value (size));
				names.Add ("realloc_function");
				vals.Add (new GLib.Value (realloc_function));
				names.Add ("destroy_function");
				vals.Add (new GLib.Value (destroy_function));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			GLibSharp.ReallocFuncWrapper realloc_function_wrapper = new GLibSharp.ReallocFuncWrapper (realloc_function);
			Raw = g_memory_output_stream_new(data, new UIntPtr (size), realloc_function_wrapper.NativeDelegate, destroy_function);
		}