コード例 #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
ファイル: MainWindow.xaml.cs プロジェクト: drypa/BlogSample
 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();
 }