Пример #1
0
 public unsafe void View(IntPtr dataPtr, Type type, RuntimeViewerFactoryRegister register)
 {
     try
     {
         ref var data      = ref UnsafeUtility.AsRef <BlobVariant>(dataPtr.ToPointer());
         var     valuePtr  = data.ReadOnlyPtrWithReadWriteFallback(_index, ref _blob, ref _blackboard);
         var     valueType = type.GetGenericArguments()[0];
         Value = Marshal.PtrToStructure(valuePtr, valueType).ToString();
     }
Пример #2
0
 public unsafe void View(IntPtr dataPtr, Type type, RuntimeViewerFactoryRegister register)
 {
     Assert.IsTrue(type.IsGenericType && type.GetGenericTypeDefinition() == typeof(BlobArray <>));
     ref var offsetPtr   = ref UnsafeUtility.AsRef <int>(dataPtr.ToPointer());
Пример #3
0
 public unsafe void View(IntPtr dataPtr, Type type, RuntimeViewerFactoryRegister register)
 {
     Assert.AreEqual(type, typeof(T));
     View(ref UnsafeUtility.AsRef <T>(dataPtr.ToPointer()));
 }