Interface IFileSessionManager
Interface for the management of finding file based sessions contained on the file system for indexing as SQL Race Sessions.
Namespace: MESL.SqlRace.Domain
Assembly: MESL.SqlRace.Domain.dll
Syntax
public interface IFileSessionManager
Methods
GetIndexedFileSessionFolder(String, String, Boolean)
Get the indexed file sessions from the cache
Declaration
IEnumerable<ISessionSummary> GetIndexedFileSessionFolder(string connectionString, string path, bool includeSubdirectories)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | The connection string for the cache database |
System.String | path | The path to the indexed folder |
System.Boolean | includeSubdirectories | Whether or not to include descendent directories of the path given. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISessionSummary> | The session summaries of the session files in the given folder |
GetIndexedFileSessionFolder(String, String, Boolean, IFilter, IEnumerable<SortCriterion>, Nullable<Int32>, Nullable<Int32>)
Get the indexed file sessions from the cache
Declaration
IEnumerable<ISessionSummary> GetIndexedFileSessionFolder(string connectionString, string path, bool includeSubdirectories, IFilter filter, IEnumerable<SortCriterion> sortCriteria, Nullable<int> pageNumber, Nullable<int> pageSize)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | The connection string for the cache database |
System.String | path | The path to the indexed folder |
System.Boolean | includeSubdirectories | Whether or not to include descendent directories of the path given. |
IFilter | filter | The filter to limit the number of sessions returned |
System.Collections.Generic.IEnumerable<SortCriterion> | sortCriteria | The fields to sort the result by |
System.Nullable<System.Int32> | pageNumber | The 1 based page number |
System.Nullable<System.Int32> | pageSize | The number of items per page |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISessionSummary> | The session summaries of the session files in the given folder |
IndexFileSessions(List<String>, String, Boolean)
Load a FileSession from specified path
Declaration
IEnumerable<ISessionSummary> IndexFileSessions(List<string> fileSessionFullPaths, string connectionString, bool processAssociated)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.String> | fileSessionFullPaths | Fully qualified path and filename to a file based session |
System.String | connectionString | Database connection string to use for file session |
System.Boolean | processAssociated | Whether to include Associate sessions for processing |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISessionSummary> | List of ISessionSummary representing the File session and Associates (if requested) |
IsSessionFile(String)
Returns true if the file is a type that we can load as a session, false otherwise
Declaration
bool IsSessionFile(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath |
Returns
Type | Description |
---|---|
System.Boolean |
IsSessionFileOrDependent(String)
Returns true if the file is a type that we can load as a session or a file that depends on a session (e.g. SSE), false otherwise
Declaration
bool IsSessionFileOrDependent(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath |
Returns
Type | Description |
---|---|
System.Boolean |
Load(String, IList<String>)
Loads the specified file session.
Declaration
IClientSession Load(string fileSession, IList<string> associatesToLoad = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileSession | The file session. |
System.Collections.Generic.IList<System.String> | associatesToLoad | The associates to load |
Returns
Type | Description |
---|---|
IClientSession |
LoadSessionSummariesForFiles(IList<String>, CancellationToken, IProgress<SessionProcessingStatusUpdate>)
Load only session summaries for the given files
Declaration
IEnumerable<ISessionSummary> LoadSessionSummariesForFiles(IList<string> files, CancellationToken token, IProgress<SessionProcessingStatusUpdate> progress)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.String> | files | The files that need to be the summary been loaded |
System.Threading.CancellationToken | token | A token to cancel the operation during processing |
System.IProgress<SessionProcessingStatusUpdate> | progress | Progress reports on the number of the requested summaries that have been loaded |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISessionSummary> |
LoadSessionSummariesForPath(String, Boolean, IFilter, IEnumerable<SortCriterion>, Nullable<Int32>, Nullable<Int32>, CancellationToken, IProgress<SessionProcessingStatusUpdate>)
Load only session summaries for the files present in the given folder
Declaration
IEnumerable<ISessionSummary> LoadSessionSummariesForPath(string folderPath, bool includeSubdirectories, IFilter filter, IEnumerable<SortCriterion> sortCriteria, Nullable<int> pageNumber, Nullable<int> pageSize, CancellationToken token, IProgress<SessionProcessingStatusUpdate> progress)
Parameters
Type | Name | Description |
---|---|---|
System.String | folderPath | Fully qualified path |
System.Boolean | includeSubdirectories | Recusive or not |
IFilter | filter | A filter to limit the results returned |
System.Collections.Generic.IEnumerable<SortCriterion> | sortCriteria | The field and sort direction |
System.Nullable<System.Int32> | pageNumber | The 1 based page number of results |
System.Nullable<System.Int32> | pageSize | The number of items per page |
System.Threading.CancellationToken | token | A token to cancel the operation |
System.IProgress<SessionProcessingStatusUpdate> | progress |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISessionSummary> |
LoadSessionSummariesForPath(String, Boolean, CancellationToken, IProgress<SessionProcessingStatusUpdate>)
Load only session summaries for the files present in the given folder
Declaration
IEnumerable<ISessionSummary> LoadSessionSummariesForPath(string folderPath, bool includeSubdirectories, CancellationToken token, IProgress<SessionProcessingStatusUpdate> progress)
Parameters
Type | Name | Description |
---|---|---|
System.String | folderPath | Fully qualified path |
System.Boolean | includeSubdirectories | Recusive or not |
System.Threading.CancellationToken | token | A token to cancel the operation |
System.IProgress<SessionProcessingStatusUpdate> | progress |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISessionSummary> |
PopulateMetadataFromFullLoad(Session)
Assigns the configuration and update the session constants.
Declaration
bool PopulateMetadataFromFullLoad(Session session)
Parameters
Type | Name | Description |
---|---|---|
Session | session | The session file object. |
Returns
Type | Description |
---|---|
System.Boolean | true if session summary is found. |
ProcessFileSessionConfiguration(String, String, Boolean)
Processes the file session configuration.
Declaration
void ProcessFileSessionConfiguration(string fileSessionFullPath, string connectionString, bool processAssociated)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileSessionFullPath | The file session full path. |
System.String | connectionString | The connection string. |
System.Boolean | processAssociated | Whether to include Associate sessions for processing |