コード例 #1
0
 private void OnDiscoveryCompleted(object sender, IdentityProviderDiscoveryClient.GetCompletedEventArgs e)
 {
     var s = sender as IdentityProviderDiscoveryClient;
     s.GetCompleted -= OnDiscoveryCompleted;
     _providerList = e.IdentityProvider;
     
     _syncContext.Post(o =>
     {
         this.DataContext = _providerList;
         Mouse.OverrideCursor = Cursors.Arrow;
     }, null);
 }
コード例 #2
0
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(this.AcsNamespace)) throw new ArgumentException("Missing AcsNamespace");
     if (string.IsNullOrEmpty(this.Realm)) throw new ArgumentException("Missing Realm");
     
     this.Show();
     Mouse.OverrideCursor = Cursors.Wait;
     
     ThreadPool.QueueUserWorkItem(_ =>
         {
             var disco = new IdentityProviderDiscoveryClient(this.AcsNamespace, this.Realm);
             disco.GetCompleted += this.OnDiscoveryCompleted;
             disco.GetAsync(IdentityProviderDiscoveryClient.Protocols.JavaScriptNotify);
         });
 }