Exemplo n.º 1
0
 public void FromManaged(BoolStruct managed)
 {
     _boolStructNative = new BoolStructNative
     {
         b1 = (byte)(managed.b1 ? 1 : 0),
         b2 = (byte)(managed.b2 ? 1 : 0),
         b3 = (byte)(managed.b3 ? 1 : 0)
     };
 }
Exemplo n.º 2
0
 public static BoolStructNative ConvertToUnmanaged(BoolStruct managed)
 {
     return(new BoolStructNative
     {
         b1 = (byte)(managed.b1 ? 1 : 0),
         b2 = (byte)(managed.b2 ? 1 : 0),
         b3 = (byte)(managed.b3 ? 1 : 0)
     });
 }
Exemplo n.º 3
0
 public BoolStructNative(BoolStruct bs)
 {
     b1 = (byte)(bs.b1 ? 1 : 0);
     b2 = (byte)(bs.b2 ? 1 : 0);
     b3 = (byte)(bs.b3 ? 1 : 0);
 }