C# Class Shared.Data.Extractors.WindowTitleArtifactExtractor

This class offers some methods to receive detailed information about an artifact, extracted from the programs, tracked by the WindowsActivityTracker Hint: The WindowsActivityTracker must be enabled to make use of the extractor
Mostrar archivo Open project: sealuzh/PersonalAnalytics

Public Methods

Method Description
CleanWindowTitle ( string process, string title ) : string
GetArtifactDetails ( string process, string windowTitle ) : string

To get the file name and extension, we do the following; 1. change the process name if it is just applicationhost (Windows 10 apps) 2. remove unnecessary stuff like [Administrator] from the window title 3. remove program name from window title 4. get the file extension based on the window name and program

GetFileExtensionFromFileName ( string fileName ) : string

Returns the file extension from file name

GetFileNameFromPath ( string path ) : string

Returns the file name from a path

GetFileNameWithoutExtension ( string path ) : string

Returns the file name from a path

GetFilesWorkedOn ( DateTimeOffset date ) : List

Private Methods

Method Description
GetFileExtensionsFromProcess ( string process ) : List

Get the file extension from the process name

GetSqlForProgramsToSearch ( ) : string
ValidateOrAddExtension ( string fileName, string process ) : string

Add a file extension if necessary

Method Details

CleanWindowTitle() public static method

public static CleanWindowTitle ( string process, string title ) : string
process string
title string
return string

GetArtifactDetails() public static method

To get the file name and extension, we do the following; 1. change the process name if it is just applicationhost (Windows 10 apps) 2. remove unnecessary stuff like [Administrator] from the window title 3. remove program name from window title 4. get the file extension based on the window name and program
public static GetArtifactDetails ( string process, string windowTitle ) : string
process string
windowTitle string
return string

GetFileExtensionFromFileName() public static method

Returns the file extension from file name
public static GetFileExtensionFromFileName ( string fileName ) : string
fileName string
return string

GetFileNameFromPath() public static method

Returns the file name from a path
public static GetFileNameFromPath ( string path ) : string
path string
return string

GetFileNameWithoutExtension() public static method

Returns the file name from a path
public static GetFileNameWithoutExtension ( string path ) : string
path string
return string

GetFilesWorkedOn() public static method

public static GetFilesWorkedOn ( DateTimeOffset date ) : List
date DateTimeOffset
return List