Esempio n. 1
0
 public EntityException(db2hbmconfEntity cfg)
 {
     entityMatch = new Regex(cfg.match, RegexOptions.Compiled);
     if (cfg.exclude == true)
     {
         bindAction = (e, model) => model.RemoveEntity(e);
     }
     else
     {
         bindAction = (e, model) => ApplyExceptions(e, model);
     }
     if (null != cfg.membername)
     {
         foreach (var m in cfg.membername)
         {
             memberExceptions.Add(MemberExceptionBase.CreateMemberException(m));
         }
     }
     if (null != cfg.membertag)
     {
         foreach (var m in cfg.membertag)
         {
             memberExceptions.Add(MemberExceptionBase.CreateTagException(m));
         }
     }
     if (null != cfg.alter)
     {
         foreach (var a in cfg.alter)
         {
             alterActions.AddRange(AlterActionBase.Create(a));
         }
     }
 }
Esempio n. 2
0
 public MemberExceptionBase(string match, tagmodifier cfg)
 {
     nameRegex = new Regex(match, RegexOptions.Compiled);
     exclude   = cfg.exclude;
     if (null != cfg.alter)
     {
         alterActions.AddRange(AlterActionBase.Create(cfg.alter));
     }
 }