Example #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 } }}");
         }
 }
Example #2
0
 public static ManagedGCHandle <T> FromAddress <T>(int address)
 {
     return(ManagedGCHandle <T> .FromAddress(address));
 }