public CoreFactAttribute(TmpInterfaceAttribute tmp, CoreInterface parent, CoreModel model) : base(tmp, parent, model)
 {
     if (tmp.Parameters != null)
     {
         var x = tmp.Parameters.Where(p => p.Name.Equals("default"));
         if (x.Count() > 0)
         {
             DefaultValue = x.First().Value;
         }
         else
         {
             DefaultValue = null;
         }
     }
 }
Exemple #2
0
        public CoreAttribute(TmpInterfaceAttribute tmp, CoreInterface parent, CoreModel model)
        {
            BaseData         = tmp;
            ParentInterface  = parent;
            coreModel        = model;
            WhitespaceBefore = tmp.WhitespaceBefore;
            IsCalculated     = false;
            FormerName       = null;

            if (tmp.Parameters != null && tmp.Parameters.Where(a => a.Name == "primary_key" && a.Value == "true").Count() > 0)
            {
                IsPrimaryKey = true;
            }
            if (tmp.Parameters != null && tmp.Parameters.Where(p => p.Name == "former_name").Count() > 0)
            {
                FormerName = tmp.Parameters.Where(p => p.Name == "former_name").First().Value;
            }
            if (tmp.Parameters.Where(p => p.Name == "calculated" && p.Value == "true").Count() == 1)
            {
                IsCalculated = true;
            }
        }
Exemple #3
0
 public CoreRefAttribute(TmpInterfaceAttribute tmp, CoreInterface parent, CoreModel model) : base(tmp, parent, model)
 {
     this.Alias = tmp.Alias;
 }