public AccountAuthViewModel(IDialogCoordinator dialogCordinator, IAppDispatcher dispatcher)
        {
            _dialogCordinator = dialogCordinator;
            _dispatcher       = dispatcher;

            Title = "Account Authorization";
        }
Beispiel #2
0
        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)));
        }
Beispiel #3
0
        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)));


        }
Beispiel #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;
 }
Beispiel #5
0
 public DocumentFileWatcher(IAppDispatcher appDispatcher)
 {
     _appDispatcher              = appDispatcher;
     _fileSystemWatcher          = new FileSystemWatcher();
     _fileSystemWatcher.Created += OnChanged;
     _fileSystemWatcher.Renamed += OnRenamed;
     _fileSystemWatcher.Deleted += OnChanged;
     _fileSystemWatcher.IncludeSubdirectories = true;
 }
Beispiel #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);
        }
Beispiel #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";
        }
        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();
        }
Beispiel #9
0
        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);
            });
        }
Beispiel #10
0
        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);
            });
        }
Beispiel #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);
            }
        }
Beispiel #12
0
 public TaskActivityWatcher(IMazeRestClient restClient, IAppDispatcher dispatcher)
 {
     _restClient = restClient;
     _dispatcher = dispatcher;
 }
Beispiel #13
0
 public RemoteDesktopChannel(IAppDispatcher dispatcher)
 {
     _dispatcher = dispatcher;
     _cancellationTokenSource = new CancellationTokenSource();
 }
Beispiel #14
0
 public ClipboardSynchronizer(ITargetedRestClient restClient, IAppDispatcher dispatcher, ClipboardWatcher clipboardWatcher)
 {
     _restClient       = restClient;
     _dispatcher       = dispatcher;
     _clipboardWatcher = clipboardWatcher;
 }
Beispiel #15
0
 public ClipboardWatcher(IAppDispatcher dispatcher)
 {
     _dispatcher = dispatcher;
 }
Beispiel #16
0
 public UserController(IAppDispatcher app)
 {
     _app = app;
 }
Beispiel #17
0
 public ClientManager(IMazeRestClient restClient, IAppDispatcher appDispatcher)
 {
     _restClient    = restClient;
     _appDispatcher = appDispatcher;
 }
Beispiel #18
0
 public UserController(IAppDispatcher app)
 {
     _app = app;
 }