コード例 #1
0
ファイル: MyPrincipal.cs プロジェクト: RobRobertsCE/MVVM
        public static MyPrincipal Login(
            string username, string password)
        {
            var identity =
                MembershipIdentity.GetMembershipIdentity
                <MembershipIdentity>(username, password);

            return(new MyPrincipal(identity));
        }
コード例 #2
0
        public static void LoginUsingMembershipProviderDataPortal(string name, string password)
        {
            var identity = MembershipIdentity.GetMembershipIdentity <MembershipIdentityStub>(name, password, false);

            SetPrincipal(identity);
        }
コード例 #3
0
        public static void LoginUsingMembershipProviderWebServer(string name, string password)
        {
            var identity = MembershipIdentity.GetMembershipIdentity <MembershipIdentityStub>(name, password, true);

            SetPrincipal(identity);
        }
コード例 #4
0
 public static void LoginUsingInvalidMembershipProvider(EventHandler <DataPortalResult <SilverlightPrincipal> > completed)
 {
     MembershipIdentity.GetMembershipIdentity <SilverlightMembershipIdentity>("invalidusername", VALID_TEST_PWD,
                                                                              (o, e) =>
                                                                              OnGetIdentityComplete(e, completed));
 }
コード例 #5
0
 public static void LoginUsingMembershipProviderWebServer(EventHandler <DataPortalResult <SilverlightPrincipal> > completed)
 {
     MembershipIdentity.GetMembershipIdentity <SilverlightMembershipIdentity>(VALID_TEST_UID, VALID_TEST_PWD,
                                                                              (o, e) =>
                                                                              OnGetIdentityComplete(e, completed));
 }
コード例 #6
0
        public static void LoginUsingMembershipProviderWebServer(string name, string password)
        {
            SilverlightMembershipIdentity identity = MembershipIdentity.GetMembershipIdentity <SilverlightMembershipIdentity>(name, password);

            SetPrincipal(identity);
        }
コード例 #7
0
        public static void LoginUsingMembershipProviderDataPortal(string name, string password)
        {
            var identity = MembershipIdentity.GetMembershipIdentity <SilverlightMembershipIdentity>(name, password);

            SetPrincipal(identity);
        }
コード例 #8
0
 public static void LoginUsingMembershipProviderDatPortal(string uid, string pwd, EventHandler <DataPortalResult <SilverlightPrincipal> > completed)
 {
     MembershipIdentity.GetMembershipIdentity <MembershipIdentityStub>(
         (o, e) =>
         OnGetIdentityComplete(e, completed), uid, pwd, false);
 }