public ArchitectureConsoleViewModel()
        {
            AddModuleCommand    = new DelegateCommand(obj => { PrepareCommand(string.Format("AddModule {0}", "value?")); });
            RemoveModuleCommand = new DelegateCommand(obj => { PrepareCommand(string.Format("RemoveModule {0}", "value?")); });
            ViewModuleCommand   = new DelegateCommand(obj => { PrepareCommand(string.Format("ViewModule {0}", "value?")); });

            ExecuteCommand = new DelegateCommand(obj =>
            {
                ConsoleLine        = ConsoleLines.Last();
                ConsoleLine.Status = CommandStatus.None;

                _subscription.SubscribeFirstPublication(Messages.COMMAND_PROCESSED, OnProcessed);

                MessageBus.Instance.Publish(Messages.COMMAND_LINE_SUBMITTED, ConsoleLine.Content);
            });

            ModuleDefinitionCommand = new DelegateCommand(obj =>
            {
                MessageBus.Instance.Publish(Global.Messages.REQUEST_MODULES_VIEW, SelectedLayer);
            });

            _subscription.SubscribeFirstPublication(Global.Messages.REQUEST_ARCHITECTURE_DEPENDENCIES_COMPLETED, obj =>
            {
                var dependencies = obj as ArchitectureDependencies;
                _services        = dependencies.Services;
            });

            _subscription.Subscribe(Global.Messages.REQUEST_ARCHITECTURE_VIEWMODEL, obj => MessageBus.Instance.Publish(Global.Messages.REQUEST_ARCHITECTURE_VIEWMODEL_COMPLETED, this));

            ConsoleLine = new ConsoleLine();
            ConsoleLines.Add(ConsoleLine);
        }
        public ArchitectureConsoleViewModel()
        {
            AddModuleCommand = new DelegateCommand(obj => { PrepareCommand(string.Format("AddModule {0}", "value?")); });
            RemoveModuleCommand = new DelegateCommand(obj => { PrepareCommand(string.Format("RemoveModule {0}", "value?")); });
            ViewModuleCommand = new DelegateCommand(obj => { PrepareCommand(string.Format("ViewModule {0}", "value?")); });

            ExecuteCommand = new DelegateCommand(obj =>
                {
                    ConsoleLine = ConsoleLines.Last();
                    ConsoleLine.Status = CommandStatus.None;

                    _subscription.SubscribeFirstPublication(Messages.COMMAND_PROCESSED, OnProcessed);

                    MessageBus.Instance.Publish(Messages.COMMAND_LINE_SUBMITTED, ConsoleLine.Content);
                });

            ModuleDefinitionCommand = new DelegateCommand(obj =>
                {
                    MessageBus.Instance.Publish(Global.Messages.REQUEST_MODULES_VIEW, SelectedLayer);
                });

            _subscription.SubscribeFirstPublication(Global.Messages.REQUEST_ARCHITECTURE_DEPENDENCIES_COMPLETED, obj =>
                {
                    var dependencies = obj as ArchitectureDependencies;
                    _services = dependencies.Services;
                });

            _subscription.Subscribe(Global.Messages.REQUEST_ARCHITECTURE_VIEWMODEL, obj => MessageBus.Instance.Publish(Global.Messages.REQUEST_ARCHITECTURE_VIEWMODEL_COMPLETED, this));

            ConsoleLine = new ConsoleLine();
            ConsoleLines.Add(ConsoleLine);
        }
Example #3
0
        public CommandBase()
        {
            _subscription.SubscribeFirstPublication(Global.Messages.REQUEST_ARCHITECTURE_DEPENDENCIES_COMPLETED, obj =>
                {
                    var dependencies = obj as ArchitectureDependencies;
                    _services = dependencies.Services;
                });

            var isIntegrationMode = false;
            MessageBus.Instance.Publish(Global.Messages.REQUEST_ARCHITECTURE_DEPENDENCIES, isIntegrationMode);
        }
Example #4
0
        public CommandBase()
        {
            _subscription.SubscribeFirstPublication(Global.Messages.REQUEST_ARCHITECTURE_DEPENDENCIES_COMPLETED, obj =>
            {
                var dependencies = obj as ArchitectureDependencies;
                _services        = dependencies.Services;
            });

            var isIntegrationMode = false;

            MessageBus.Instance.Publish(Global.Messages.REQUEST_ARCHITECTURE_DEPENDENCIES, isIntegrationMode);
        }
 public void Initialize(ArchitectureDependencies dependencies)
 {
     _services = dependencies.Services;
 }
 public void Initialize(ArchitectureDependencies dependencies)
 {
     _services = dependencies.Services;
 }