public Library( [NotNull] IConfigStore configStore, [NotNull] IPreviewBuilder builder, [NotNull] IPreviewImageStore previewStore, [NotNull] IMessageRelay relay) { _previewBuilder = builder ?? throw new ArgumentNullException(nameof(builder)); _configStore = configStore ?? throw new ArgumentNullException(nameof(configStore)); _previewStore = previewStore ?? throw new ArgumentNullException(nameof(previewStore)); _relay = relay ?? throw new ArgumentNullException(nameof(relay)); _previewModels = new ItemPreviewModelSet(_previewStore, relay); }
public void InitializeView(IPreviewBuilder previewBuilder, IAssetPreview assetPreview) { previewer = assetPreview; builder = previewBuilder; var viewModel = previewer.PreviewViewModel; if (viewModel != null) { viewModel.AttachPreview(previewer); DataContext = viewModel; } UpdateXenkoView(); Loaded += OnLoaded; }