LiveCodingChat.Livecoding.LivecodingSession.EnsureAuthenticated C# (CSharp) Метод

EnsureAuthenticated() публичный Метод

public EnsureAuthenticated ( ) : void
Результат void
        public void EnsureAuthenticated()
        {
            if (Authenticated) {
                if (SessionAutenticated != null)
                    SessionAutenticated (this, new System.EventArgs ());
            } else {
                if (PasswordRequested != null) {
                    string password = "";
                    PasswordRequested (this, ref password);
                    BeginAuthenticate (password);
                }
            }
        }

Usage Example

Пример #1
0
 public frmMain()
 {
     InitializeComponent ();
     chatForms = new Dictionary<string,frmChat> ();
     frmLogin frmLogin = new frmLogin ();
     if (frmLogin.ShowDialog () != System.Windows.Forms.DialogResult.OK) {
         this.Close ();
         Application.Exit ();
         return;
     }
     session = new LivecodingSession (LiveCodingChat.LoginFactory.Instance.CreateInstance(frmLogin.LoginMethod),frmLogin.Username);
     session.PasswordRequested += (object sender, ref string Password) => Password = frmLogin.Password;
     session.SessionAutenticated += Session_SessionAutenticated;;
     session.EnsureAuthenticated ();
 }
All Usage Examples Of LiveCodingChat.Livecoding.LivecodingSession::EnsureAuthenticated