Пример #1
0
 public static void Login(string username, string password, EventHandler <DataPortalResult <RolodexIdentity> > completed)
 {
     RolodexIdentity.GetIdentity(username, password, (o, e) =>
     {
         if (e.Object == null)
         {
             SetPrincipal(RolodexIdentity.UnauthenticatedIdentity());
         }
         else
         {
             SetPrincipal(e.Object);
         }
         completed(e.Object, e);
     });
 }
Пример #2
0
        public static void Login(string username, string password)
        {
            RolodexIdentity identity = RolodexIdentity.GetIdentity(username, password);

            SetPrincipal(identity);
        }