// IUSERSETTINGS
        // IUSERSETTINGS
        // IUSERSETTINGS

        public async Task <object> ResolveUserAsync()
        {
            object userInfo = Manager.UserSettingsObject;

            if (userInfo == null)
            {
                using (UserDataProvider userDP = new UserDataProvider()) {
                    Manager.UserSettingsObject = userInfo = await userDP.GetItemAsync();
                }
            }
            return(userInfo);
        }
        public async Task SetPropertyAsync(string name, System.Type type, object value)
        {
            // set the user settings (for anonymous users create one)
            UserData userInfo = (UserData) await ResolveUserAsync();

            // get the requested property
            PropertyInfo pi = ObjectSupport.GetProperty(userInfo.GetType(), name);

            if (pi == null)
            {
                throw new InternalError("User setting {0} doesn't exist", name);
            }
            if (pi.PropertyType != type)
            {
                throw new InternalError("User setting {0} is not of the requested type {1}", name, type.FullName);
            }
            pi.SetValue(userInfo, value);
            using (UserDataProvider userDP = new UserDataProvider()) {
                await userDP.UpdateItemAsync(userInfo);
            }
        }