/// <summary> Removes the sync logic for member _client</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 DesetupSyncClient(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _client, new PropertyChangedEventHandler( OnClientPropertyChanged ), "Client", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticImportPathRelations.ClientEntityUsingClientIdStatic, true, signalRelatedEntity, "ImportPaths", resetFKFields, new int[] { (int)ImportPathFieldIndex.ClientId } ); _client = null; }
/// <summary> setups the sync logic for member _client</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncClient(IEntityCore relatedEntity) { if(_client!=relatedEntity) { DesetupSyncClient(true, true); _client = (ClientEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _client, new PropertyChangedEventHandler( OnClientPropertyChanged ), "Client", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticImportPathRelations.ClientEntityUsingClientIdStatic, true, new string[] { } ); } }
protected ImportPathEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _files = (EntityCollection<FileEntity>)info.GetValue("_files", typeof(EntityCollection<FileEntity>)); _client = (ClientEntity)info.GetValue("_client", typeof(ClientEntity)); if(_client!=null) { _client.AfterSave+=new EventHandler(OnEntityAfterSave); } _contentType = (ContentTypeEntity)info.GetValue("_contentType", typeof(ContentTypeEntity)); if(_contentType!=null) { _contentType.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }