Exemplo n.º 1
0
        public ProbeSectionViewModel(AppControllerCore controller)
        {
            this._controller = controller ?? throw new ArgumentNullException(nameof(controller));

            Task.Run(async() => Arguments = await _controller.LoadArgumentsAsync());

            PropertyChanged += async(_, e) =>
            {
                switch (e.PropertyName)
                {
                case nameof(Arguments):
                    await _controller.SaveArgumentsAsync(Arguments?.Trim());

                    break;
                }
            };
        }