Updating BuildIt

Updating BuildIt

It’s been a while but I’ve just published an update to the BuildIt libraries with the aim to streamline the syntax for declaring states. For example, the following are the state declarations for the Flickr viewer sample application:
StateManager.Group<RegionStates>()
 .WithHistory()
  .DefineStateWithData<RegionStates, MainViewModel>(RegionStates.Main) 
   .WhenChangedTo(vm => vm.Load())
   .OnDefaultCompleteWithData(vm => vm.SelectedPhoto)
    .ChangeState(RegionStates.Details)
     .InitializeNewState<RegionStates, MainViewModel, DetailsViewModel, Photo>  
         ((vm, d) => vm.Photo = d)
  .DefineStateWithData<RegionStates, DetailsViewModel>(RegionStates.Details);

Leave a Reply

Your email address will not be published. Required fields are marked *