Example #1
0
 public void Transfer(ISharpStatefulComponent previous)
 {
     Component = previous;
 }
 public static List <int> DidMountCounter(this ISharpStatefulComponent component)
 {
     return(((ISharpWpfTestComponent)component).DidMountCounter);
 }
 public static List <int> WillUpdateCounter(this ISharpStatefulComponent component)
 {
     return(((ISharpWpfTestComponent)component).WillUpdateCounter);
 }
Example #4
0
 public void UpdateComponent(int level, NewState newState, ISharpProp previous, ISharpProp next, ISharpStatefulComponent statefulComponent, object newComponentState)
 {
     statefulComponent.WillReceiveProps(next);
     // assign properties to one or the another, perhaps an if should do better
     if (statefulComponent is ISharpNativeComponent nativeComponent)
     {
         nativeComponent.AssignProperties(this, level, newState, previous, next);
     }
     else if (statefulComponent is ISharpComponent component)
     {
         component.AssignProperties(next);
     }
     else
     {
         throw new NotImplementedException("Unknown component type or null");
     }
     statefulComponent.DidUpdate(next, newComponentState);
 }