상속: 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;
 }
 partial void DeleteDataFile(DataFile instance);
 partial void UpdateDataFile(DataFile instance);
 partial void InsertDataFile(DataFile instance);
		private void detach_DataFiles(DataFile entity)
		{
			this.SendPropertyChanging();
			entity.FileGroup = null;
		}
		private void attach_DataFiles(DataFile entity)
		{
			this.SendPropertyChanging();
			entity.FileGroup = this;
		}