public void AddNGVideoOwnerId(string userId, string userName) { RemoveNGVideoOwnerId(userId); var userIdInfo = new UserIdInfo() { UserId = userId, Description = userName }; NGVideoOwnerUserIds.Add(userIdInfo); }
public bool RemoveNGVideoOwnerId(string userId) { var item = NGVideoOwnerUserIds.SingleOrDefault(x => x.UserId == userId); if (item != null) { return(NGVideoOwnerUserIds.Remove(item)); } else { return(false); } }
public void AddNGVideoOwnerId(string userId, string userName) { RemoveNGVideoOwnerId(userId); var userIdInfo = new UserIdInfo() { UserId = userId, Description = userName }; NGVideoOwnerUserIds.Add(userIdInfo); Save().ConfigureAwait(false); }
public bool RemoveNGVideoOwnerId(string userId) { try { var item = NGVideoOwnerUserIds.SingleOrDefault(x => x.UserId == userId); if (item != null) { return(NGVideoOwnerUserIds.Remove(item)); } else { return(false); } } finally { Save().ConfigureAwait(false); } }