Esempio n. 1
0
 private static ImportPath Parse(ImportPathEntity dbEntity)
 {
     return new ImportPath
         {
             ClientId = dbEntity.ClientId,
             Id = dbEntity.ImportPathId,
             IsEnabled = dbEntity.IsEnabled,
             IsLocal = dbEntity.IsLocal,
             Path = dbEntity.Path
         };
 }
Esempio n. 2
0
 /// <summary> Removes the sync logic for member _importPath</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 DesetupSyncImportPath(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity( _importPath, new PropertyChangedEventHandler( OnImportPathPropertyChanged ), "ImportPath", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticFileRelations.ImportPathEntityUsingImportPathIdStatic, true, signalRelatedEntity, "Files", resetFKFields, new int[] { (int)FileFieldIndex.ImportPathId } );
     _importPath = null;
 }
Esempio n. 3
0
 /// <summary> setups the sync logic for member _importPath</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncImportPath(IEntityCore relatedEntity)
 {
     if(_importPath!=relatedEntity)
     {
         DesetupSyncImportPath(true, true);
         _importPath = (ImportPathEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity( _importPath, new PropertyChangedEventHandler( OnImportPathPropertyChanged ), "ImportPath", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticFileRelations.ImportPathEntityUsingImportPathIdStatic, true, new string[] {  } );
     }
 }
Esempio n. 4
0
 protected FileEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _episodeToFiles = (EntityCollection<EpisodeToFileEntity>)info.GetValue("_episodeToFiles", typeof(EntityCollection<EpisodeToFileEntity>));
         _fileAudioStreams = (EntityCollection<FileAudioStreamEntity>)info.GetValue("_fileAudioStreams", typeof(EntityCollection<FileAudioStreamEntity>));
         _fileVideoStreams = (EntityCollection<FileVideoStreamEntity>)info.GetValue("_fileVideoStreams", typeof(EntityCollection<FileVideoStreamEntity>));
         _importPath = (ImportPathEntity)info.GetValue("_importPath", typeof(ImportPathEntity));
         if(_importPath!=null)
         {
             _importPath.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }