protected EventCustomerNotificationEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _eventCustomers = (EventCustomersEntity)info.GetValue("_eventCustomers", typeof(EventCustomersEntity)); if (_eventCustomers != null) { _eventCustomers.AfterSave += new EventHandler(OnEntityAfterSave); } _notification = (NotificationEntity)info.GetValue("_notification", typeof(NotificationEntity)); if (_notification != null) { _notification.AfterSave += new EventHandler(OnEntityAfterSave); } _notificationType = (NotificationTypeEntity)info.GetValue("_notificationType", typeof(NotificationTypeEntity)); if (_notificationType != null) { _notificationType.AfterSave += new EventHandler(OnEntityAfterSave); } base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> setups the sync logic for member _notificationType</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncNotificationType(IEntity2 relatedEntity) { if (_notificationType != relatedEntity) { DesetupSyncNotificationType(true, true); _notificationType = (NotificationTypeEntity)relatedEntity; base.PerformSetupSyncRelatedEntity(_notificationType, new PropertyChangedEventHandler(OnNotificationTypePropertyChanged), "NotificationType", NotificationSubscribersEntity.Relations.NotificationTypeEntityUsingNotificationTypeId, true, new string[] { }); } }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _notificationType = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
/// <summary> Removes the sync logic for member _notificationType</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 DesetupSyncNotificationType(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity(_notificationType, new PropertyChangedEventHandler(OnNotificationTypePropertyChanged), "NotificationType", NotificationSubscribersEntity.Relations.NotificationTypeEntityUsingNotificationTypeId, true, signalRelatedEntity, "NotificationSubscribers", resetFKFields, new int[] { (int)NotificationSubscribersFieldIndex.NotificationTypeId }); _notificationType = null; }