예제 #1
0
 internal void UpdateContents(int componentRef, VDomItem[] oldVDom, VDomItem[] newVDom, bool replace)
 {
     using (var gcHandleOld = ManagedGCHandle.FromObject(oldVDom))
         using (var gcHandleNew = ManagedGCHandle.FromObject(newVDom))
         {
             var replaceValue = replace ? "true" : "false";
             SetElemFromVNode($@"{{ ""elementRef"": ""{ _elementRef }"", ""componentRef"": { componentRef }, ""oldVDom"":{ gcHandleOld.Address }, ""newVDom"":{ gcHandleNew.Address }, ""replaceContainer"":{ replaceValue } }}");
         }
 }
예제 #2
0
 public static ManagedGCHandle <T> FromAddress <T>(int address)
 {
     return(ManagedGCHandle <T> .FromAddress(address));
 }