Exemplo n.º 1
0
 public static void InvokeStateHasChanged(this WeakRefCollection <ComponentBase> components)
 {
     components.ForEach(component =>
     {
         var handleEvent = component as IHandleEvent;
         handleEvent?.HandleEventAsync(EventCallbackWorkItem.Empty, null);
     });
 }
Exemplo n.º 2
0
        public static void InvokeStateHasChanged(this WeakRefCollection <ComponentBase> components)
        {
            var stateHasChangedMethod = typeof(ComponentBase).GetMethod("StateHasChanged", BindingFlags.NonPublic | BindingFlags.Instance);

            components.ForEach(component =>
            {
                stateHasChangedMethod.Invoke(component, new object[] { });
            });
        }