Esempio n. 1
0
        /// <summary>
        /// When angular disconnect, this function will sync
        /// all [ Components, Events, Props, Vars ] with angular again
        /// </summary>
        private static void ReSyncMauComponents()
        {
            foreach ((_, MauComponent mauComponent) in _mauComponents)
            {
                // Vars [ Must be first ]
                foreach ((string varName, PropertyInfo _) in mauComponent.HandledVars)
                {
                    MauVariable.SendMauVariable(mauComponent, varName);
                }

                // Props
                Dictionary <string, MauPropertyHolder> props = mauComponent.GetValidToSetHandledProps();
                foreach ((string propName, _) in props)
                {
                    MauProperty.SendMauProp(mauComponent, propName);
                }

                // Events
                MauEventAttribute.SendMauEventsAsync(mauComponent);
            }

            if (_mauComponents.Count > 0)
            {
                SendRequest(string.Empty, RequestType.DotNetReady);
            }
        }
Esempio n. 2
0
 public void UpdateData()
 {
     MauVariable.UpdateVar(Holder, MauDataName);
 }