Files
DP44/Common/DTS.Common.DataModel/.svn/pristine/e0/e0902008eb5039a1d4f1737abf722163ed90d144.svn-base

79 lines
2.0 KiB
Plaintext
Raw Normal View History

2026-04-17 14:55:32 -04:00
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
{
/// <summary>
/// list that holds groups
/// </summary>
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
/// <summary>
/// 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
/// </summary>
/// <param name="to"></param>
/// <param name="bNotify"></param>
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()
{
}
}
}