/// <summary> Removes the sync logic for member _artworkType</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 DesetupSyncArtworkType(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _artworkType, new PropertyChangedEventHandler( OnArtworkTypePropertyChanged ), "ArtworkType", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticArtworkRelations.ArtworkTypeEntityUsingArtworkTypeIdStatic, true, signalRelatedEntity, "Artworks", resetFKFields, new int[] { (int)ArtworkFieldIndex.ArtworkTypeId } ); _artworkType = null; }
/// <summary> setups the sync logic for member _artworkType</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncArtworkType(IEntityCore relatedEntity) { if(_artworkType!=relatedEntity) { DesetupSyncArtworkType(true, true); _artworkType = (ArtworkTypeEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _artworkType, new PropertyChangedEventHandler( OnArtworkTypePropertyChanged ), "ArtworkType", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticArtworkRelations.ArtworkTypeEntityUsingArtworkTypeIdStatic, 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 }