/// <summary> Removes the sync logic for member _artworkSource</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 DesetupSyncArtworkSource(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _artworkSource, new PropertyChangedEventHandler( OnArtworkSourcePropertyChanged ), "ArtworkSource", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticArtworkRelations.ArtworkSourceEntityUsingArtworkSourceIdStatic, true, signalRelatedEntity, "Artworks", resetFKFields, new int[] { (int)ArtworkFieldIndex.ArtworkSourceId } ); _artworkSource = null; }
/// <summary> setups the sync logic for member _artworkSource</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncArtworkSource(IEntityCore relatedEntity) { if(_artworkSource!=relatedEntity) { DesetupSyncArtworkSource(true, true); _artworkSource = (ArtworkSourceEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _artworkSource, new PropertyChangedEventHandler( OnArtworkSourcePropertyChanged ), "ArtworkSource", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticArtworkRelations.ArtworkSourceEntityUsingArtworkSourceIdStatic, true, new string[] { } ); } }
protected ArtworkEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _artworkToEpisodes = (EntityCollection<ArtworkToEpisodeEntity>)info.GetValue("_artworkToEpisodes", typeof(EntityCollection<ArtworkToEpisodeEntity>)); _artworkToPeople = (EntityCollection<ArtworkToPersonEntity>)info.GetValue("_artworkToPeople", typeof(EntityCollection<ArtworkToPersonEntity>)); _artworkToRoles = (EntityCollection<ArtworkToRoleEntity>)info.GetValue("_artworkToRoles", typeof(EntityCollection<ArtworkToRoleEntity>)); _artworkToSeasons = (EntityCollection<ArtworkToSeasonEntity>)info.GetValue("_artworkToSeasons", typeof(EntityCollection<ArtworkToSeasonEntity>)); _artworkToSeries = (EntityCollection<ArtworkToSeriesEntity>)info.GetValue("_artworkToSeries", typeof(EntityCollection<ArtworkToSeriesEntity>)); _artworkSource = (ArtworkSourceEntity)info.GetValue("_artworkSource", typeof(ArtworkSourceEntity)); if(_artworkSource!=null) { _artworkSource.AfterSave+=new EventHandler(OnEntityAfterSave); } _artworkType = (ArtworkTypeEntity)info.GetValue("_artworkType", typeof(ArtworkTypeEntity)); if(_artworkType!=null) { _artworkType.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }