示例#1
0
        public UserNotificationSetting GetUserNotificationSetting()
        {
            UserNotificationSetting userNotificationSetting = new UserNotificationSetting("123", 1, 1, false, false, 1);
            UserProfile             user     = new UserProfile(1123, "User Name", "Full Name", "0505050500", "*****@*****.**", new List <UserNotificationSetting>(1));
            PropertyInfo            userProp = userNotificationSetting.GetType().GetProperty("User");

            userProp.SetValue(userNotificationSetting, user);
            return(userNotificationSetting);
        }
        public List <UserNotificationSetting> GetUserNotificationSettingWithProfileId()
        {
            var generalSetting = new UserNotificationSetting("123", 1, 1, true, true, 1);
            List <UserNotificationSetting> userNotificationSetting = new List <UserNotificationSetting>();

            userNotificationSetting.Add(generalSetting);

            UserProfile  user     = new UserProfile(102, "User Name", "Full Name", "0505050500", "*****@*****.**", new List <UserNotificationSetting>(1));
            PropertyInfo userProp = generalSetting.GetType().GetProperty("User");

            userProp.SetValue(generalSetting, user);

            return(userNotificationSetting);
        }