Ejemplo n.º 1
0
        private void SetBy(Service.ServiceTypes st, ServiceConstraint sc)
        {
            var existing = GetBy(st);

            if (existing == null)
            {
                this.ServiceConstraints.Add(sc);
            }
            else if (sc == null)
            {
                this.ServiceConstraints.Remove(existing);
            }
            else
            {
                existing = sc;
            }
        }
Ejemplo n.º 2
0
 private ServiceConstraint GetBy(Service.ServiceTypes st)
 {
     return(this.ServiceConstraints.SingleOrDefault(f => f.ServiceTypeId == (int)st));
 }