示例#1
0
 public static void Login(string username, string password, string roles, EventHandler <EventArgs> completed)
 {
     BusinessIdentity.GetIdentity(username, password, roles, (o, e) =>
     {
         if (e.Object == null)
         {
             SetPrincipal(BusinessIdentity.UnauthenticatedIdentity());
         }
         else
         {
             SetPrincipal(e.Object);
         }
         completed(null, EventArgs.Empty);
     });
 }
示例#2
0
 public static void Login(string username, string password, string roles)
 {
     BusinessIdentity.GetIdentity(username, password, roles);
 }