C# Class gp.Files.FactDB

Create and Maintain a List of Random Facts.
Mostra file Open project: vatsal/getputs

Public Methods

Method Description
GetRandomFact ( ) : string

Get a Random Fact from the FactDB List [Note: Do not forget to assign the FilePath (excluding the FileName) to the property: gp.Files.FileLoader.FilePath]

ReLoadList ( ) : void

Reload the FactDB List. [Note: Do not forget to assign the FilePath (excluding the FileName) to the property: gp.Files.FileLoader.FilePath]

StoreFact ( string fullFilePath, int count ) : void

Get and Store n number of Random Facts from the factURL, where n = Count [Note: Do not forget to assign the FilePath (excluding the FileName) to the property: gp.Files.FileLoader.FilePath]

Private Methods

Method Description
FactDB ( ) : System

Reads Words File

Method Details

GetRandomFact() public method

Get a Random Fact from the FactDB List [Note: Do not forget to assign the FilePath (excluding the FileName) to the property: gp.Files.FileLoader.FilePath]
public GetRandomFact ( ) : string
return string

ReLoadList() public method

Reload the FactDB List. [Note: Do not forget to assign the FilePath (excluding the FileName) to the property: gp.Files.FileLoader.FilePath]
public ReLoadList ( ) : void
return void

StoreFact() public method

Get and Store n number of Random Facts from the factURL, where n = Count [Note: Do not forget to assign the FilePath (excluding the FileName) to the property: gp.Files.FileLoader.FilePath]
public StoreFact ( string fullFilePath, int count ) : void
fullFilePath string The Path and the FileName.
count int The number of Facts to be returned.
return void