public AssociatedSubjectViewModel( AssociatedSubject associatedSubject, IValidator<AssociatedSubject> subjectValidator, Subject subject, Guid busId) { if (subject == null) throw new ArgumentNullException("subject"); if (associatedSubject == null) throw new ArgumentNullException("associatedSubject"); this._subjectValidator = subjectValidator; this._associatedSubject = associatedSubject; this._subject = subject; this._busId = busId; InitializeCommands(); }
private void RaiseSubjectAdded(AssociatedSubject subject) { var handler = SubjectAddedEvent; if (handler != null) handler(this, new SubjectEventArgs(subject)); }
private void AddSubject(AssociatedSubject associatedSubject) { if (associatedSubject != null) _answer.Fields.Add(associatedSubject); }
public SubjectEventArgs(AssociatedSubject subject) { _subject = subject; }
private void RemoveSubject(AssociatedSubject associatedSubject) { if (associatedSubject != null) _answer.Fields.Remove(associatedSubject); }