Exemple #1
0
        private static IDataEntityProperty FindBaseProperty(ref IDataEntityPropertyCollection properties, string name, ref ICollection <IDataEntity> ancestors)
        {
            if (properties == null)
            {
                return(null);
            }

            var baseEntity = properties.Entity.GetBaseEntity();

            if (baseEntity != null)
            {
                ancestors = new List <IDataEntity>();
                ancestors.Add(baseEntity);
            }

            while (baseEntity != null)
            {
                if (baseEntity.Properties.TryGet(name, out var property))
                {
                    return(property);
                }

                baseEntity = baseEntity.GetBaseEntity();

                if (baseEntity != null)
                {
                    ancestors.Add(baseEntity);
                }
            }

            return(null);
        }
Exemple #2
0
 public static IEnumerable <IComplexProperty> GetComplexProperties(this IDataEntityPropertyCollection properties, bool onlyDbProperty = true)
 {
     for (int i = 0; i < properties.Count; i++)
     {
         IDataEntityProperty metadata          = properties[i];
         IComplexProperty    iteratorVariable0 = metadata as IComplexProperty;
         if ((iteratorVariable0 != null) && (!onlyDbProperty || !metadata.IsDbIgnore()))
         {
             yield return(iteratorVariable0);
         }
     }
 }
 public BoolDataEntityState(IDataEntityPropertyCollection properties, BitArray dirtyArray, PkSnapshot[] pkSnapshots, bool fromDatabase)
     : base(pkSnapshots, fromDatabase)
 {
     this._properties = properties;
     this._dirtyArray = dirtyArray;
 }