コード例 #1
0
        /// <summary>
        /// Check that data is valid.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <param name="context">Web service request context.</param>
        public static void CheckData(this WebUser user,
                                     WebServiceContext context)
        {
            WebData data;

            data = user;
            data.CheckData();
            user.UserName.CheckNotEmpty("UserName");
            user.UserName.CheckLength(GetUserNameMaxLength(context));
            user.UserName.CheckRegularExpression(Settings.Default.UserNameRegularExpression);
        }