Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
コード例 #1
0
 partial void UpdateDataFile(DataFile instance);
コード例 #2
0
 partial void DeleteDataFile(DataFile instance);
コード例 #3
0
 private void detach_DataFiles(DataFile entity)
 {
     this.SendPropertyChanging();
     entity.FileGroup = null;
 }
コード例 #4
0
 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;
            }
コード例 #6
0
 private void attach_DataFiles(DataFile entity)
 {
     this.SendPropertyChanging();
     entity.FileGroup = this;
 }
コード例 #7
0
 partial void DeleteDataFile(DataFile instance);
コード例 #8
0
 partial void UpdateDataFile(DataFile instance);
コード例 #9
0
 partial void InsertDataFile(DataFile instance);
コード例 #10
0
		private void detach_DataFiles(DataFile entity)
		{
			this.SendPropertyChanging();
			entity.FileGroup = null;
		}
コード例 #11
0
		private void attach_DataFiles(DataFile entity)
		{
			this.SendPropertyChanging();
			entity.FileGroup = this;
		}