예제 #1
0
 public void Set <T>(GlobalVariableId <T> id, T value) where T : unmanaged
 {
     unsafe
     {
         fixed(long *ptr = &_values[id.VariableId])
         * (T *)ptr = value;
     }
 }
예제 #2
0
 public T Get <T>(GlobalVariableId <T> id) where T : unmanaged
 {
     unsafe
     {
         fixed(long *ptr = &_values[id.VariableId])
         return(*(T *)ptr);
     }
 }
예제 #3
0
 public void Set <T>(GlobalVariableId <T> id, T value) where T : unmanaged => throw new NotSupportedException();
예제 #4
0
 public T Get <T>(GlobalVariableId <T> id) where T : unmanaged => throw new NotSupportedException();