using System; using System.Collections.Generic; using System.Linq; using System.Windows; using DataPROWin7.Common; using DTS.Common.Base; using DTS.Common.Utilities.Logging; using DTS.Common.ISO; using DTS.Common.DataModel; // ReSharper disable once CheckNamespace namespace DataPROWin7.DataModel { /// /// list that holds groups /// public class TestObjectList : BasePropertyChanged { #region Tags and Constants public enum Tags { TestObjects } #endregion #region Properties private static readonly object MyLock = new object(); private static TestObjectList _testObjectList; public static TestObjectList TestObjectsList { get { lock (MyLock) { if (null == _testObjectList) { _testObjectList = new TestObjectList(); } } return _testObjectList; } } #endregion #region Methods /// /// adds a group /// will notify listeners if bNotify is true /// you would not want to notify listeners if you are in a bulk /// operation and intend to refresh everyone when done /// /// /// public void Add(TestObject to, bool bNotify) { to.LastModifiedBy = ApplicationProperties.CurrentUser.UserName; to.SetLastModified(DateTime.Now); to.Commit(); if (bNotify) { OnPropertyChanged("TestObjects"); } } public void UpdateAll() { OnPropertyChanged("TestObjects"); } #endregion protected TestObjectList() { } } }