| | 1 | | using System.Linq; |
| | 2 | | using DCL.Interface; |
| | 3 | |
|
| | 4 | | public class UserProfileWebInterfaceBridge : IUserProfileBridge |
| | 5 | | { |
| 0 | 6 | | public void SaveUnverifiedName(string name) => WebInterface.SendSaveUserUnverifiedName(name); |
| | 7 | |
|
| 0 | 8 | | public void SaveDescription(string description) => WebInterface.SendSaveUserDescription(description); |
| | 9 | |
|
| 3 | 10 | | public UserProfile GetOwn() => UserProfile.GetOwnUserProfile(); |
| | 11 | |
|
| | 12 | | public void AddUserProfileToCatalog(UserProfileModel userProfileModel) |
| | 13 | | { |
| 0 | 14 | | UserProfileController.i.AddUserProfileToCatalog(userProfileModel); |
| 0 | 15 | | } |
| | 16 | |
|
| | 17 | | public UserProfile Get(string userId) |
| | 18 | | { |
| 0 | 19 | | return UserProfileController.userProfilesCatalog.Get(userId); |
| | 20 | | } |
| | 21 | |
|
| | 22 | | public UserProfile GetByName(string userNameOrId) |
| | 23 | | { |
| 0 | 24 | | return UserProfileController.userProfilesCatalog.GetValues().FirstOrDefault(p => p.userName == userNameOrId); |
| | 25 | | } |
| | 26 | | } |