internal void Update(object val) { if (GType.Is(type, GType.Boxed) && !(val is IWrapper)) { Marshal.StructureToPtr(val, g_value_get_boxed(ref this), false); } }
internal void Update(object val) { if (GType.Is(type, GType.Boxed) && !(val is IWrapper)) { MethodInfo mi = val.GetType().GetMethod("Update", BindingFlags.NonPublic | BindingFlags.Instance); IntPtr boxed_ptr = g_value_get_boxed(ref this); if (mi == null) { Marshal.StructureToPtr(val, boxed_ptr, false); } else { mi.Invoke(val, null); } } }
public bool IsInstance(IntPtr raw) { return(GType.Is(ValFromInstancePtr(raw), this)); }