示例#1
0
        public Task<List<IdentityProviderInformation>> GetIdps(string ns, string realm)
        {
            var disco = new IdentityProviderDiscoveryClient(ns, realm);
            return disco.GetAsync(Protocols.WSFederation).ContinueWith(task =>
            {
                var providerList = task.Result;

                return providerList;
            });
        }
        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;

            var sync = SynchronizationContext.Current;

            var disco = new IdentityProviderDiscoveryClient(AcsNamespace, Realm);
            disco.GetAsync(Protocols.JavaScriptNotify).ContinueWith(task =>
                {
                    sync.Post(state =>
                        {
                            _providerList = task.Result;
                            this.DataContext = _providerList;
                            Mouse.OverrideCursor = Cursors.Arrow;
                        }, null);
                });
        }