/// <remarks/>
 public void LoginAsync(UserCredentials credentials, object userState) {
     if ((this.LoginOperationCompleted == null)) {
         this.LoginOperationCompleted = new System.Threading.SendOrPostCallback(this.OnLoginOperationCompleted);
     }
     this.InvokeAsync("Login", new object[] {
                 credentials}, this.LoginOperationCompleted, userState);
 }
 public void Login(UserCredentials credentials) {
     this.Invoke("Login", new object[] {
                 credentials});
 }
 /// <remarks/>
 public void LoginAsync(UserCredentials credentials) {
     this.LoginAsync(credentials, null);
 }
        public static void GetScores()
        {
            AuthenticationProxy.Authentication auth = new AuthenticationProxy.Authentication
            {
                Url = Settings.Instance.SumTotalWebServiceAuthentication
            };

            AuthenticationProxy.UserCredentials credentials = new AuthenticationProxy.UserCredentials
            {
                Username = Settings.Instance.SumTotalUsername,
                Passcode = Settings.Instance.SumTotalPasscode
            };
            auth.Login(credentials);
            TranscriptManagementProxy.TranscriptManagement transmgmt = new TranscriptManagementProxy.TranscriptManagement
            {
                Url = "https://stage1.sumtotalsystems.com/southerncostage82ws/services/transcriptmanagement.asmx", //Settings.Instance.SumTotalWebSeviceUserManagement,
                UserSecurityContextValue = new TranscriptManagementProxy.UserSecurityContext
                {
                    Token = new TranscriptManagementProxy.UserToken { Value = auth.UserTokenValue.Value }
                }
            };
            UserManagementProxy.UserManagement usermgmt = new UserManagementProxy.UserManagement
            {
                Url = Settings.Instance.SumTotalWebServiceUserManagement,
                UserSecurityContextValue = new UserManagementProxy.UserSecurityContext
                {
                    Token = new UserManagementProxy.UserToken { Value = auth.UserTokenValue.Value }
                }
            };
            RosterManagementProxy.RosterManagement rostermgmt = new RosterManagementProxy.RosterManagement
            {
                Url = "https://stage1.sumtotalsystems.com/southerncostage82ws/services/rostermanagement.asmx", //Settings.Instance.SumTotalWebSeviceActivityManagement,
                UserSecurityContextValue = new RosterManagementProxy.UserSecurityContext
                {
                    Token = new RosterManagementProxy.UserToken { Value = auth.UserTokenValue.Value }
                }
            };

            var usr = usermgmt.GetUserByUserName("8593", "HSUser1", 0);

            rostermgmt.AddUserToRoster(usr.Id, "64671");
            //rostermgmt.CancelUserRegistration(usr.Id, "64671");
            var progress = rostermgmt.GetUserProgress(usr.Id, "64671", 1);

            var attempts = transmgmt.GetUserTranscripts(usr.Id, 1);
        }