Ru.GameSchool.DataLayer.Repository.UserInfo.FixupUserType C# (CSharp) Метод

FixupUserType() приватный Метод

private FixupUserType ( UserType previousValue ) : void
previousValue UserType
Результат void
        private void FixupUserType(UserType previousValue)
        {
            if (previousValue != null && previousValue.UserInfoes.Contains(this))
            {
                previousValue.UserInfoes.Remove(this);
            }
    
            if (UserType != null)
            {
                if (!UserType.UserInfoes.Contains(this))
                {
                    UserType.UserInfoes.Add(this);
                }
                if (UserTypeId != UserType.UserTypeID)
                {
                    UserTypeId = UserType.UserTypeID;
                }
            }
        }