Пример #1
0
        /// <inheritdoc/>
        public override void Lock(bool recursive)
        {
            base.Lock(recursive);

            int currentFieldId = FieldInfo.MinFieldId;

            foreach (var field in fields)
            {
                field.FieldId = currentFieldId++;
            }
            isLeaf = GetIsLeaf();
            key    = GetKey();

            if (IsEntity || IsStructure)
            {
                Accessors = new FieldAccessorProvider(this);
            }

            if (!recursive)
            {
                return;
            }

            validators = new ReadOnlyList <IObjectValidator>(validators.ToList());

            affectedIndexes.Lock(true);
            indexes.Lock(true);
            columns.Lock(true);
            fieldMap.Lock(true);
            fields.Lock(true);
        }
Пример #2
0
 /// <inheritdoc/>
 public override void Lock(bool recursive)
 {
     base.Lock(recursive);
     if (!recursive)
     {
         return;
     }
     validators = new ReadOnlyList <IPropertyValidator>(validators.ToList());
     Fields.Lock(true);
     if (column != null)
     {
         column.Lock(true);
     }
     if (associations.Count > 1)
     {
         var sorted = associations.Reorder();
         associations = new NodeCollection <AssociationInfo>(associations.Owner, associations.Name);
         associations.AddRange(sorted);
     }
     associations.Lock(false);
 }