/// <summary> Removes the sync logic for member _episode</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 DesetupSyncEpisode(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _episode, new PropertyChangedEventHandler( OnEpisodePropertyChanged ), "Episode", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticEpisodeToFileRelations.EpisodeEntityUsingEpisodeIdStatic, true, signalRelatedEntity, "EpisodeToFiles", resetFKFields, new int[] { (int)EpisodeToFileFieldIndex.EpisodeId } ); _episode = null; }
/// <summary> setups the sync logic for member _episode</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncEpisode(IEntityCore relatedEntity) { if(_episode!=relatedEntity) { DesetupSyncEpisode(true, true); _episode = (EpisodeEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _episode, new PropertyChangedEventHandler( OnEpisodePropertyChanged ), "Episode", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticEpisodeToFileRelations.EpisodeEntityUsingEpisodeIdStatic, true, new string[] { } ); } }
protected EpisodeToFileEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _episode = (EpisodeEntity)info.GetValue("_episode", typeof(EpisodeEntity)); if(_episode!=null) { _episode.AfterSave+=new EventHandler(OnEntityAfterSave); } _file = (FileEntity)info.GetValue("_file", typeof(FileEntity)); if(_file!=null) { _file.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }