/// <summary> setups the sync logic for member _list</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncList(IEntityCore relatedEntity) { if(_list!=relatedEntity) { DesetupSyncList(true, true); _list = (ListEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _list, new PropertyChangedEventHandler( OnListPropertyChanged ), "List", MonoSoftware.MonoX.DAL.RelationClasses.StaticListItemRelations.ListEntityUsingListIdStatic, true, new string[] { } ); } }
protected ListItemEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _listItemLocalizations = (EntityCollection<ListItemLocalizationEntity>)info.GetValue("_listItemLocalizations", typeof(EntityCollection<ListItemLocalizationEntity>)); _snRelationships = (EntityCollection<SnRelationshipEntity>)info.GetValue("_snRelationships", typeof(EntityCollection<SnRelationshipEntity>)); _list = (ListEntity)info.GetValue("_list", typeof(ListEntity)); if(_list!=null) { _list.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> Removes the sync logic for member _list</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 DesetupSyncList(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _list, new PropertyChangedEventHandler( OnListPropertyChanged ), "List", MonoSoftware.MonoX.DAL.RelationClasses.StaticListItemRelations.ListEntityUsingListIdStatic, true, signalRelatedEntity, "ListItems", resetFKFields, new int[] { (int)ListItemFieldIndex.ListId } ); _list = null; }
/// <summary> Removes the sync logic for member _list</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 DesetupSyncList(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity(_list, new PropertyChangedEventHandler(OnListPropertyChanged), "List", MonoSoftware.MonoX.DAL.RelationClasses.StaticListItemRelations.ListEntityUsingListIdStatic, true, signalRelatedEntity, "ListItems", resetFKFields, new int[] { (int)ListItemFieldIndex.ListId }); _list = null; }