Commit for development environment setup

This commit is contained in:
2023-06-19 16:12:33 -04:00
parent be72063a3c
commit bbce2ad0a6
2209 changed files with 1171775 additions and 625 deletions

View File

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
namespace Csla.Validation
{
internal class RulesList
{
private List<IRuleMethod> _list = new List<IRuleMethod>();
private bool _sorted;
private List<string> _dependantProperties;
public void Add(IRuleMethod item)
{
_list.Add(item);
_sorted = false;
}
public List<IRuleMethod> GetList(bool applySort)
{
if (applySort && !_sorted)
{
lock (_list)
{
if (applySort && !_sorted)
{
_list.Sort();
_sorted = true;
}
}
}
return _list;
}
public List<string> GetDependancyList(bool create)
{
if (_dependantProperties == null && create)
_dependantProperties = new List<string>();
return _dependantProperties;
}
}
}