コード例 #1
0
ファイル: HubViewModel.cs プロジェクト: rlefever68/Broobu
 /// <summary>
 /// Configures for user.
 /// </summary>
 /// <param name="info">The info.</param>
 public void ConfigureForUser(UserEnvironmentInfo info)
 {
     if (info != null)
     {
         IsMyAppsVisible = true;
         IsLogVisible    = true;
         Info            = info;
         _logger.Info("**************************************************************************");
         _logger.Info(" Start Configuration Sequence for user {0}", WulkaSession.Current.Username);
         _logger.Info("**************************************************************************");
         _logger.Info("Current Credentials User Name:\t{0}", WulkaCredentials.Current.UserName);
         _logger.Info("Current Wulka Session:\tUser: {0}\tSession:{1}", WulkaSession.Current.Username,
                      WulkaSession.Current.Id);
         _logger.Info("Received Boutique Info:\tGreeting: {0}\n", info.Greeting);
         FeedbackText = info.Greeting;
         IsEnabled    = true;
         UpdateLoginButton();
         GotoMyApps();
     }
     else
     {
         IsMyAppsVisible = false;
         IsLogVisible    = true;
     }
 }
コード例 #2
0
        /// <summary>
        /// Gets the Boutique user info.
        /// </summary>
        /// <param name="userName">Name of the user.</param>
        /// <param name="passWord">The pass word.</param>
        /// <returns></returns>
        public UserEnvironmentInfo GetUserEnvironmentInfo(string userName)
        {
            var res = new UserEnvironmentInfo
            {
                Menu     = EcoSpaceFactory.MasterEcoSpace.Menu,
                Greeting = String.Format("User '{0}' validated.", userName)
            };

            return(res);
        }
コード例 #3
0
        /// <summary>
        /// Gets the user information.
        /// </summary>
        /// <param name="userId">The user identifier.</param>
        /// <param name="fullName">The full name.</param>
        /// <returns>UserEnvironmentInfo.</returns>
        public UserEnvironmentInfo GetUserInfo(string userId, string fullName)
        {
            var res = new UserEnvironmentInfo();
            var clt = CreateClient();

            try
            {
                res = clt
                      .GetUserInfo(userId, fullName)
                      .Unzip <UserEnvironmentInfo>();
            }
            catch (Exception ex)
            {
                _logger.Error(ex.GetCombinedMessages());
            }
            finally
            {
                CloseClient(clt);
            }
            return(res);
        }