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(); }
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(); }