Пример #1
0
        protected InventoryItemTestEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _inventoryItem = (InventoryItemEntity)info.GetValue("_inventoryItem", typeof(InventoryItemEntity));
                if (_inventoryItem != null)
                {
                    _inventoryItem.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _test = (TestEntity)info.GetValue("_test", typeof(TestEntity));
                if (_test != null)
                {
                    _test.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
Пример #2
0
 /// <summary> Removes the sync logic for member _inventoryItem</summary>
 /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
 /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
 private void DesetupSyncInventoryItem(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_inventoryItem, new PropertyChangedEventHandler(OnInventoryItemPropertyChanged), "InventoryItem", ItemEntity.Relations.InventoryItemEntityUsingInventoryItemId, true, signalRelatedEntity, "Item", resetFKFields, new int[] { (int)ItemFieldIndex.InventoryItemId });
     _inventoryItem = null;
 }
Пример #3
0
 /// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
 /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
 /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
 public override RelationCollection GetRelationsForFieldOfType(string fieldName)
 {
     return(InventoryItemEntity.GetRelationsForField(fieldName));
 }