C# Class Bamboo.Prevalence.Util.PrevalenceBaseUtil

Summary description for PrevalenceBaseUtil.
Show file Open project: bamboo/Bamboo.Prevalence

Public Methods

Method Description
FindLastSnapshot ( PrevalenceEngine engine ) : FileInfo

Returns the last (most recent) snapshot file in the PrevalenceEngine.PrevalenceBase folder or null when no snapshot exists.

FindLastSnapshot ( FileInfo files ) : int

Returns the index of the last snapshot file in files.

GetFileInfoRange ( FileInfo files, int index, int count ) : System.IO.FileInfo[]

Creates a new array of count objects from files starting at index.

GetPrevalenceFilesSortedByName ( PrevalenceEngine engine ) : System.IO.FileInfo[]

Returns a list with all the files in the PrevalenceBase folder sorted by name.

GetSnapshotFiles ( PrevalenceEngine engine ) : System.IO.FileInfo[]

Returns all snapshot files in the PrevalenceEngine.PrevalenceBase folder sorted by filename.

GetUnnecessaryPrevalenceFiles ( PrevalenceEngine engine ) : System.IO.FileInfo[]

Returns a list with all the files that are no longer necessary to restore the state of the prevalence system.

SortFilesByName ( FileInfo files ) : void

Sorts the array by FileInfo.Name.

Method Details

FindLastSnapshot() public static method

Returns the last (most recent) snapshot file in the PrevalenceEngine.PrevalenceBase folder or null when no snapshot exists.
public static FindLastSnapshot ( PrevalenceEngine engine ) : FileInfo
engine Bamboo.Prevalence.PrevalenceEngine the prevalence engine
return System.IO.FileInfo

FindLastSnapshot() public static method

Returns the index of the last snapshot file in files.
public static FindLastSnapshot ( FileInfo files ) : int
files System.IO.FileInfo
return int

GetFileInfoRange() public static method

Creates a new array of count objects from files starting at index.
public static GetFileInfoRange ( FileInfo files, int index, int count ) : System.IO.FileInfo[]
files System.IO.FileInfo source array
index int first index to copy
count int items to be copied
return System.IO.FileInfo[]

GetPrevalenceFilesSortedByName() public static method

Returns a list with all the files in the PrevalenceBase folder sorted by name.
public static GetPrevalenceFilesSortedByName ( PrevalenceEngine engine ) : System.IO.FileInfo[]
engine Bamboo.Prevalence.PrevalenceEngine the prevalence engine
return System.IO.FileInfo[]

GetSnapshotFiles() public static method

Returns all snapshot files in the PrevalenceEngine.PrevalenceBase folder sorted by filename.
public static GetSnapshotFiles ( PrevalenceEngine engine ) : System.IO.FileInfo[]
engine Bamboo.Prevalence.PrevalenceEngine the prevalence engine
return System.IO.FileInfo[]

GetUnnecessaryPrevalenceFiles() public static method

Returns a list with all the files that are no longer necessary to restore the state of the prevalence system.
public static GetUnnecessaryPrevalenceFiles ( PrevalenceEngine engine ) : System.IO.FileInfo[]
engine Bamboo.Prevalence.PrevalenceEngine the prevalence engine
return System.IO.FileInfo[]

SortFilesByName() public static method

Sorts the array by FileInfo.Name.
public static SortFilesByName ( FileInfo files ) : void
files System.IO.FileInfo array to be sorted in place
return void