コード例 #1
0
        public AccountAuthViewModel(IDialogCoordinator dialogCordinator, IAppDispatcher dispatcher)
        {
            _dialogCordinator = dialogCordinator;
            _dispatcher       = dispatcher;

            Title = "Account Authorization";
        }
コード例 #2
0
ファイル: PipelineTests.cs プロジェクト: AppTonic/AppTonic
        public PipelineTests()
        {
            var container = new Container(c =>
            {
                c.Scan(s =>
                {
                    s.AssemblyContainingType(typeof(RequestPipelineHandler <>));
                    s.ConnectImplementationsToTypesClosing(typeof(IHandle <>));
                    s.ConnectImplementationsToTypesClosing(typeof(IHandle <,>));
                    s.ConnectImplementationsToTypesClosing(typeof(IHandleAsync <>));
                    s.ConnectImplementationsToTypesClosing(typeof(IHandleAsync <,>));
                    s.TheCallingAssembly();
                    s.WithDefaultConventions();
                    s.AddAllTypesOf(typeof(IPreRequestHandler <>));
                    s.AddAllTypesOf(typeof(IPostRequestHandler <>));
                    s.AddAllTypesOf(typeof(IPostRequestResponseHandler <,>));
                });

                c.For(typeof(IHandle <>)).DecorateAllWith(typeof(RequestPipelineHandler <>));
                c.For(typeof(IHandle <,>)).DecorateAllWith(typeof(RequestResponsePipelineHandler <,>));
                c.For(typeof(IHandleAsync <>)).DecorateAllWith(typeof(AsyncRequestPipelineHandler <>));
                c.For(typeof(IHandleAsync <,>)).DecorateAllWith(typeof(AsyncRequestResponsePipelineHandler <,>));
            });

            container.AssertConfigurationIsValid();

            _dispatcher = AppDispatcherFactory.Create(app => app.UseCommonServiceLocator(new StructureMapServiceLocator(container)));
        }
コード例 #3
0
ファイル: PipelineTests.cs プロジェクト: AppTonic/AppTonic
        public PipelineTests()
        {
            var container = new Container(c =>
             {
                 c.Scan(s =>
                 {
                     s.AssemblyContainingType(typeof(RequestPipelineHandler<>));
                     s.ConnectImplementationsToTypesClosing(typeof(IHandle<>));
                     s.ConnectImplementationsToTypesClosing(typeof(IHandle<,>));
                     s.ConnectImplementationsToTypesClosing(typeof(IHandleAsync<>));
                     s.ConnectImplementationsToTypesClosing(typeof(IHandleAsync<,>));
                     s.TheCallingAssembly();
                     s.WithDefaultConventions();
                     s.AddAllTypesOf(typeof(IPreRequestHandler<>));
                     s.AddAllTypesOf(typeof(IPostRequestHandler<>));
                     s.AddAllTypesOf(typeof(IPostRequestResponseHandler<,>));
                 });

                 c.For(typeof(IHandle<>)).DecorateAllWith(typeof(RequestPipelineHandler<>));
                 c.For(typeof(IHandle<,>)).DecorateAllWith(typeof(RequestResponsePipelineHandler<,>));
                 c.For(typeof(IHandleAsync<>)).DecorateAllWith(typeof(AsyncRequestPipelineHandler<>));
                 c.For(typeof(IHandleAsync<,>)).DecorateAllWith(typeof(AsyncRequestResponsePipelineHandler<,>));
             });

            container.AssertConfigurationIsValid();

            _dispatcher = AppDispatcherFactory.Create(app => app.UseCommonServiceLocator(new StructureMapServiceLocator(container)));


        }
コード例 #4
0
 public TasksViewModel(IWindowService windowService, IMazeRestClient restClient, IAppDispatcher dispatcher, IServiceProvider services,
                       CommandExecutionManager commandExecutionManager) : base(Tx.T("TasksInfrastructure:Tasks"), PackIconFontAwesomeKind.CalendarCheckRegular)
 {
     CommandExecutionManager = commandExecutionManager;
     _windowService          = windowService;
     _restClient             = restClient;
     _dispatcher             = dispatcher;
     _services = services;
 }
コード例 #5
0
 public DocumentFileWatcher(IAppDispatcher appDispatcher)
 {
     _appDispatcher              = appDispatcher;
     _fileSystemWatcher          = new FileSystemWatcher();
     _fileSystemWatcher.Created += OnChanged;
     _fileSystemWatcher.Renamed += OnRenamed;
     _fileSystemWatcher.Deleted += OnChanged;
     _fileSystemWatcher.IncludeSubdirectories = true;
 }
コード例 #6
0
        public ShellViewModel(IRegionManager regionManager, IDialogService dialogService, IEventAggregator eventAggregator,
                              IDialogCoordinator dialogCordinator, IApiService apiService, IAppDispatcher dispatcher)
        {
            _regionManager    = regionManager;
            _dialogService    = dialogService;
            _eventAggregator  = eventAggregator;
            _dialogCordinator = dialogCordinator;
            _apiService       = apiService;
            _dispatcher       = dispatcher;

            ChangeThemeCommand = new DelegateCommand(ChangeTheme);
        }
コード例 #7
0
        public ApiConfigurationViewModel(IDialogCoordinator dialogCordinator, IAppDispatcher dispatcher, IEventAggregator eventAggregator)
        {
            _dialogCordinator = dialogCordinator;
            _dispatcher       = dispatcher;
            _eventAggregator  = eventAggregator;

            DoneCommand = new DelegateCommand(Done);

            LoadFromFileCommand = new DelegateCommand(LoadFromFile);

            Title = "API Configuration";
        }
コード例 #8
0
        public MainWindow()
        {
            Loaded += OnLoaded;

            var container = new ContainerConfiguration()
                            .WithAssembly(typeof(MainViewModelBase).Assembly) // RoslynPad.Common.UI
                            .WithAssembly(typeof(MainWindow).Assembly);       // RoslynPad
            var locator = container.CreateContainer().GetExport <IServiceProvider>();

            _viewModel  = locator.GetService <MainViewModelBase>();
            _dispatcher = locator.GetService <IAppDispatcher>();

            DataContext = _viewModel;
            InitializeComponent();
            DocumentsPane.ToggleAutoHide();
        }
コード例 #9
0
ファイル: IoCHandlerTests.cs プロジェクト: AppTonic/AppTonic
        public IoCHandlerTests()
        {
            var serviceLocator = new StructureMapServiceLocator(new Container(c => c.Scan(s =>
            {
                s.TheCallingAssembly();
                s.ConnectImplementationsToTypesClosing(typeof(IHandle<>));
                s.ConnectImplementationsToTypesClosing(typeof(IHandle<,>));
                s.ConnectImplementationsToTypesClosing(typeof(IHandleAsync<>));
                s.ConnectImplementationsToTypesClosing(typeof(IHandleAsync<,>));
                s.WithDefaultConventions();
            })));

            _dependencyResolver = new CommonServiceLocatorDependencyResolver(serviceLocator);

            _dispatcher = AppDispatcherFactory.Create(app =>
            {
                app.UseDependencyResolver(_dependencyResolver);
            });
        }
コード例 #10
0
ファイル: IoCHandlerTests.cs プロジェクト: AppTonic/AppTonic
        public IoCHandlerTests()
        {
            var serviceLocator = new StructureMapServiceLocator(new Container(c => c.Scan(s =>
            {
                s.TheCallingAssembly();
                s.ConnectImplementationsToTypesClosing(typeof(IHandle <>));
                s.ConnectImplementationsToTypesClosing(typeof(IHandle <,>));
                s.ConnectImplementationsToTypesClosing(typeof(IHandleAsync <>));
                s.ConnectImplementationsToTypesClosing(typeof(IHandleAsync <,>));
                s.WithDefaultConventions();
            })));

            _dependencyResolver = new CommonServiceLocatorDependencyResolver(serviceLocator);

            _dispatcher = AppDispatcherFactory.Create(app =>
            {
                app.UseDependencyResolver(_dependencyResolver);
            });
        }
コード例 #11
0
        public FileExplorerViewModel(IShellStatusBar statusBar, IWindowService windowService, IMemoryCache cache,
                                     ITargetedRestClient client, IAppDispatcher dispatcher, IImageProvider imageProvider)
        {
            StatusBar     = statusBar;
            Window        = windowService;
            RestClient    = client;
            FileSystem    = new RemoteFileSystem(cache, RestClient);
            ImageProvider = imageProvider;
            Dispatcher    = dispatcher;

            ProcessingEntries = new ObservableCollection <ProcessingEntryViewModel>();

            NavigationBarViewModel       = new NavigationBarViewModel();
            DirectoryTreeViewModel       = new DirectoryTreeViewModel();
            EntriesViewModel             = new EntriesViewModel();
            FileTransferManagerViewModel = new FileTransferManagerViewModel();

            foreach (var childViewModel in new IFileExplorerChildViewModel[]
                     { NavigationBarViewModel, DirectoryTreeViewModel, EntriesViewModel, FileTransferManagerViewModel })
            {
                childViewModel.Initialize(this);
            }
        }
コード例 #12
0
 public TaskActivityWatcher(IMazeRestClient restClient, IAppDispatcher dispatcher)
 {
     _restClient = restClient;
     _dispatcher = dispatcher;
 }
コード例 #13
0
 public RemoteDesktopChannel(IAppDispatcher dispatcher)
 {
     _dispatcher = dispatcher;
     _cancellationTokenSource = new CancellationTokenSource();
 }
コード例 #14
0
 public ClipboardSynchronizer(ITargetedRestClient restClient, IAppDispatcher dispatcher, ClipboardWatcher clipboardWatcher)
 {
     _restClient       = restClient;
     _dispatcher       = dispatcher;
     _clipboardWatcher = clipboardWatcher;
 }
コード例 #15
0
 public ClipboardWatcher(IAppDispatcher dispatcher)
 {
     _dispatcher = dispatcher;
 }
コード例 #16
0
ファイル: UserController.cs プロジェクト: AppTonic/AppTonic
 public UserController(IAppDispatcher app)
 {
     _app = app;
 }
コード例 #17
0
 public ClientManager(IMazeRestClient restClient, IAppDispatcher appDispatcher)
 {
     _restClient    = restClient;
     _appDispatcher = appDispatcher;
 }
コード例 #18
0
 public UserController(IAppDispatcher app)
 {
     _app = app;
 }