public static TabContentViewModelBase FromParam(TabParameters param, IReactiveProperty <Status> inReplyTo, TabsModel tabs, IMastodonClient client) { switch (param) { case AccountTabParameters aparam: return(new AccountTabViewModel(aparam, inReplyTo, tabs, client)); case TimelineTabParameters tparam: return(new TimelineViewModel(tparam, inReplyTo, tabs, client)); case NotificationTabParameters nparam: return(new NotificationsViewModel(nparam, client)); default: throw new NotImplementedException(); } }
public TabContentViewModelBase(TabParameters param, IReactiveProperty <Status> inReplyTo) { Name = new ReactiveProperty <string>(param.Name); this.inReplyTo = inReplyTo; }