예제 #1
0
        public MainWindow()
        {
            var alert = (Action<string>)((msg) => MessageBox.Show(msg));
            string serviceUrl = ConfigurationManager.AppSettings["SeviceUrl"];

            var client = new BlogClientController(serviceUrl);
            var notificator = new ClientNotificator(alert);
            ViewModel = new BlogViewModel(client, notificator);
            InitializeComponent();
        }
예제 #2
0
 public MainWindow()
 {
     var alert = (Action<string>)((msg) => MessageBox.Show(msg));
     string serviceUrl = ConfigurationManager.AppSettings["SeviceUrl"];
     int maxReceivedMessageSize;
     int.TryParse(ConfigurationManager.AppSettings["MaxReceivedMessageSize"], out maxReceivedMessageSize);
     var client = new BlogClient(serviceUrl, maxReceivedMessageSize);
     var notificator = new ClientNotificator(alert);
     ViewModel = new BlogViewModel(client, notificator);
     InitializeComponent();
 }