public AssigmentViewModel(IAssigment assigment, Func<ITag, ITagViewModel> tagViewModelFactory, ITagVisibilityService tagVisibilityService) { _assigment = assigment; _tagVisibilityService = tagVisibilityService; foreach (var tagViewModel in _assigment.Tags) { _tags.Add(tagViewModelFactory(tagViewModel)); } _visibility = CalculteVisibility(); _tagVisibilityService.TagVisibilityChanged += OnTagVisibilityChanged; Tags = new ReadOnlyObservableCollection<ITagViewModel>(_tags); }
public SelectableTagViewModel(ITag tag, ITagVisibilityService tagVisibilityService) { _tag = tag; _tagVisibilityService = tagVisibilityService; }