Exemplo n.º 1
0
 internal void Update(object val)
 {
     if (GType.Is(type, GType.Boxed) && !(val is IWrapper))
     {
         Marshal.StructureToPtr(val, g_value_get_boxed(ref this), false);
     }
 }
Exemplo n.º 2
0
 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);
         }
     }
 }
Exemplo n.º 3
0
 public bool IsInstance(IntPtr raw)
 {
     return(GType.Is(ValFromInstancePtr(raw), this));
 }