Пример #1
0
        public LogPage(AblyService ably)
        {
            _ably = ably;
            InitializeComponent();
            var logObserver = new LogObserver(message => LogList.Text = LogList.Text + $"[{message.Level}] " + message.Message + "\n");

            _ably.Subscribe(logObserver);
        }
Пример #2
0
        public MainPage(AblyService ably)
        {
            InitializeComponent();
            var connectionStateObserver = new ConnectionStatusObserver(x => viewModel.ConnectionStatus = x);

            ably.Subscribe(connectionStateObserver);

            BindingContext = viewModel = new MainViewModel(ably);
        }