コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: XenkoPreviewView.cs プロジェクト: Beefr/xenko-wd
        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;
        }