/// <summary> Removes the sync logic for member _contentType</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 DesetupSyncContentType(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _contentType, new PropertyChangedEventHandler( OnContentTypePropertyChanged ), "ContentType", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticImportPathRelations.ContentTypeEntityUsingContentTypeIdStatic, true, signalRelatedEntity, "ImportPaths", resetFKFields, new int[] { (int)ImportPathFieldIndex.ContentTypeId } ); _contentType = null; }
/// <summary> setups the sync logic for member _contentType</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncContentType(IEntityCore relatedEntity) { if(_contentType!=relatedEntity) { DesetupSyncContentType(true, true); _contentType = (ContentTypeEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _contentType, new PropertyChangedEventHandler( OnContentTypePropertyChanged ), "ContentType", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticImportPathRelations.ContentTypeEntityUsingContentTypeIdStatic, 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 }