/// <summary> setups the sync logic for member _eventTest</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncEventTest(IEntity2 relatedEntity) { if (_eventTest != relatedEntity) { DesetupSyncEventTest(true, true); _eventTest = (EventTestEntity)relatedEntity; base.PerformSetupSyncRelatedEntity(_eventTest, new PropertyChangedEventHandler(OnEventTestPropertyChanged), "EventTest", EventTestOrderItemEntity.Relations.EventTestEntityUsingEventTestId, true, new string[] { }); } }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _eventTest = null; _orderItem = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
protected EventTestOrderItemEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _eventTest = (EventTestEntity)info.GetValue("_eventTest", typeof(EventTestEntity)); if (_eventTest != null) { _eventTest.AfterSave += new EventHandler(OnEntityAfterSave); } _orderItem = (OrderItemEntity)info.GetValue("_orderItem", typeof(OrderItemEntity)); if (_orderItem != null) { _orderItem.AfterSave += new EventHandler(OnEntityAfterSave); } base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> Removes the sync logic for member _eventTest</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 DesetupSyncEventTest(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity(_eventTest, new PropertyChangedEventHandler(OnEventTestPropertyChanged), "EventTest", EventTestOrderItemEntity.Relations.EventTestEntityUsingEventTestId, true, signalRelatedEntity, "EventTestOrderItem", resetFKFields, new int[] { (int)EventTestOrderItemFieldIndex.EventTestId }); _eventTest = null; }