Closed ricaun closed 6 months ago
A better solution would be to create a Mock viewmodel to create logic for the demo project that does not reference the Revit Api
Yes. I'm not sure if this is right, the IEventsViewModel is something like this.
public interface IEventsViewModel : ISnoopViewModel
{
void OnNavigatedTo();
void OnNavigatedFrom();
}
A better solution would be to create a Mock viewmodel to create logic for the demo project that does not reference the Revit Api
Yes. I'm not sure if this is right, the IEventsViewModel is something like this.
public interface IEventsViewModel : ISnoopViewModel { void OnNavigatedTo(); void OnNavigatedFrom(); }
Or this. 😀
public interface IEventsViewModel : INavigationAware, ISnoopViewModel
{
}
Or this. 😀
public interface IEventsViewModel : INavigationAware, ISnoopViewModel { }
or this 😉
public interface IEventsViewModel : INavigationAware, ISnoopViewModel;
in C# 12 you can use ; instead of {} yeah, that's a great plan, let's do that)
IEventsViewModel
Done! I added a Subscribe/Unsubscribe in the moq. Strange that all de RevitApi.dll is loaded when you go into the Events.
Awesome, thanks)
Strange that all de RevitApi.dll is loaded when you go into the Events.
There because of using using Autodesk.Revit.Exceptions;
in SnoopViewModelBase, I fixed it by inheriting ObservableObject instead of SnoopViewModelBase
Summary of the Pull Request
When using
UI.Demo
theApplication.ActionEventHandler
is null.The
EventMonitor.Subscribe
andEventMonitor.Unsubscribe
throw exception.Quality Checklist