コード例 #1
0
        public void Load(XmlElement source)
        {
            Sanity.Enforce <ArgumentException>(
                source.LocalName == nameof(FetchRequest),
                $"Element must be named {nameof(FetchRequest)}");

            _predicates.Clear();
            foreach (XmlElement element in source.SelectNodes($"Predicates/{nameof(FetchPredicate)}"))
            {
                var predicate = new FetchPredicate();
                predicate.Load(element);
                _predicates.Add(predicate);
            }
        }
コード例 #2
0
 public void RemovePredicate(FetchPredicate predicate)
 {
     _predicates.Remove(predicate);
 }
コード例 #3
0
 public void AddPredicate(FetchPredicate predicate)
 {
     _predicates.Add(predicate);
 }