partial void UpdateDataFile(DataFile instance);
partial void DeleteDataFile(DataFile instance);
private void detach_DataFiles(DataFile entity) { this.SendPropertyChanging(); entity.FileGroup = null; }
partial void InsertDataFile(DataFile instance);
/// <summary> /// Gets the file group containing information about the file on /// the given file path, as well as the files related to it. /// </summary> /// <param name="dataContext">The data context used for database lookups.</param> /// <param name="xdaTimeZone">The time zone used by openXDA.</param> /// <returns></returns> public FileGroup GetFileGroup(FileInfoDataContext dataContext, TimeZoneInfo xdaTimeZone) { FileInfo fileInfo; FileGroup fileGroup; DataFile dataFile; fileGroup = new FileGroup(); fileGroup.ProcessingStartTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, xdaTimeZone); foreach (string file in GSF.IO.FilePath.GetFileList($"{m_filePathWithoutExtension}.*")) { fileInfo = new FileInfo(file); dataFile = new DataFile(); dataFile.FilePath = file; dataFile.FilePathHash = file.GetHashCode(); dataFile.FileSize = fileInfo.Length; dataFile.CreationTime = TimeZoneInfo.ConvertTimeFromUtc(fileInfo.CreationTimeUtc, xdaTimeZone); dataFile.LastWriteTime = TimeZoneInfo.ConvertTimeFromUtc(fileInfo.LastWriteTimeUtc, xdaTimeZone); dataFile.LastAccessTime = TimeZoneInfo.ConvertTimeFromUtc(fileInfo.LastAccessTimeUtc, xdaTimeZone); dataFile.FileGroup = fileGroup; } dataContext.FileGroups.InsertOnSubmit(fileGroup); dataContext.SubmitChanges(); return fileGroup; }
private void attach_DataFiles(DataFile entity) { this.SendPropertyChanging(); entity.FileGroup = this; }