public static void End(IAsyncResult asyncResult, out string userName, out string password, out IClientChannel channel)
            {
                ClientPasswordAsyncResult thisPtr = AsyncResult.End <ClientPasswordAsyncResult>(asyncResult);

                userName = thisPtr.passwordForm.UserName;
                password = thisPtr.passwordForm.Password;
                channel  = thisPtr.clientChannel;
            }
        public void EndDisplayInitializationUI(IAsyncResult result)
        {
            string         userName, password;
            IClientChannel clientChannel;

            ClientPasswordAsyncResult.End(result, out userName, out password, out clientChannel);
            ChannelParameterCollection coll = clientChannel.GetProperty <ChannelParameterCollection>();

            coll.Add(new NetworkCredential(userName, password));
        }