WCFClientView.xaml.cs 709 B

1234567891011121314151617181920212223242526
  1. using System.ComponentModel.Composition;
  2. using Infrastructure;
  3. using Log;
  4. using RealmClient.Proxy;
  5. namespace Modules.WCFClient
  6. {
  7. /// <summary>
  8. /// WCFClientView.xaml 的交互逻辑
  9. /// </summary>
  10. [ViewExport(RegionName = "WCFClientRegion"), PartCreationPolicy(CreationPolicy.NonShared)]
  11. public partial class WCFClientView
  12. {
  13. public WCFClientView()
  14. {
  15. InitializeComponent();
  16. }
  17. private async void Button_Click(object sender, System.Windows.RoutedEventArgs e)
  18. {
  19. var calculator = new CalculatorClient();
  20. double result = await calculator.AddAsync(1, 1);
  21. Logger.Trace("WCF Calculator Add: 1 + 1 = {0}", result);
  22. }
  23. }
  24. }