Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
 /// <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[] {  } );
     }
 }
Exemplo n.º 3
0
 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
 }