/// <summary>Initializes a new instance of <see cref="SlkUserCollectionChanges"/>.</summary> /// <param name="originalCollection">The original collection of users.</param> /// <param name="newCollection">The new collection of users.</param> public SlkUserCollectionChanges(SlkUserCollection originalCollection, SlkUserCollection newCollection) { Additions = new List <SlkUser>(); Removals = new List <SlkUser>(); foreach (SlkUser user in newCollection) { if (originalCollection.Contains(user.UserId) == false) { Additions.Add(newCollection[user.UserId]); } } if (newCollection.Count != originalCollection.Count + Additions.Count) { // There are some to remove foreach (SlkUser user in originalCollection) { if (newCollection.Contains(user.UserId) == false) { Removals.Add(originalCollection[user.UserId]); } } } }
/// <summary>Initializes a new instance of <see cref="AssignmentProperties"/>.</summary> AssignmentProperties(ISlkStore store) { this.Store = store; Learners = new SlkUserCollection(); Properties = new Collection <AssignmentProperty>(); }