\r\n

51Degrees Pipeline .NET  4.1Newer Version 4.4

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig > Class Template Reference

Detailed Description

Builder class that is used to create instances of DataFileConfiguration objects.

Type Constraints
TBuilder :DataFileConfigurationBuilderBase 
TBuilder :TBuilder 
TBuilder :TConfig 
TConfig :DataFileConfiguration 
TConfig :new() 

Inheritance diagram for FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >:

[legend]

Public Member Functions

 DataFileConfigurationBuilderBase ()
Constructor More...
TBuilder  SetDataFileIdentifier (string identifier)
Set the identifier of the data file that this configuration information applies to. More...
TBuilder  SetDataUpdateUrl (string url)
Configure the engine to use the specified URL when looking for an updated data file. More...
TBuilder  SetDataUpdateUrlFormatter (IDataUpdateUrlFormatter formatter)
Specify a IDataUpdateUrlFormatter to be used by the DataUpdateService when building the complete URL to query for updated data. More...
TBuilder  SetDataUpdateVerifyMd5 (bool verify)
Set a value indicating if the DataUpdateService should expect the response from the data update URL to contain a 'content-md5' HTTP header that can be used to verify the integrity of the content. More...
TBuilder  SetDataUpdateDecompress (bool decompress)
Set a value indicating if the DataUpdateService should expect content from the configured data update URL to be compressed or not. More...
TBuilder  SetAutoUpdate (bool enabled)
Enable or disable automatic updates for this engine. More...
TBuilder  SetDataFileSystemWatcher (bool enabled)
The DataUpdateService has the ability to watch a data file on disk and automatically refresh the engine as soon as the file is updated. More...
TBuilder  SetUpdatePollingInterval (int pollingIntervalSeconds)
Set the time between checks for a new data file made by the DataUpdateService. More...
TBuilder  SetUpdatePollingInterval (TimeSpan pollingInterval)
Set the time between checks for a new data file made by the DataUpdateService. More...
TBuilder  SetUpdateRandomisationMax (int maximumDeviationSeconds)
A random element can be added to the DataUpdateService polling interval. More...
TBuilder  SetUpdateRandomisationMax (TimeSpan maximumDeviation)
A random element can be added to the DataUpdateService polling interval. More...
TBuilder  SetVerifyIfModifiedSince (bool enabled)
Set if DataUpdateService sends the If-Modified-Since header in the request for a new data file. More...
TBuilder  SetDataUpdateLicenseKey (string key)
Set the license key to use when updating the Engine's data file. More...
TBuilder  SetDataUpdateLicenseKeys (string[] keys)
Set the license keys to use when updating the Engine's data file. More...
TBuilder  SetUpdateOnStartup (bool enabled)
Configure the data file to update on startup or not. More...
TConfig  Build (string filename, bool createTempCopy)
Called to indicate that configuration of this file is complete and the user can continue to configure the engine that the data file will be used by. More...
TConfig  Build (byte[] data)
Called to indicate that configuration of this file is complete and the user can continue to configure the engine that the data file will be used by. More...

Properties

List< string >  DataUpdateLicenseKeys = new List<string>() [get]
License keys to use when updating the Engine's data file. More...

Constructor & Destructor Documentation

Member Function Documentation

◆ Build() [1/2]

TConfig FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.Build ( string   filename,
bool   createTempCopy  
)

Called to indicate that configuration of this file is complete and the user can continue to configure the engine that the data file will be used by.

Parameters
filename - The path to the data file location. If a relative path is supplied then the location is determined as relative to the current working directory as supplied by Directory.GetCurrentDirectory. Whether the path is relative or absolute, if there is no file at the specified location then, before starting processing, the engine will download the latest version of the file using the configured auto-update settings.
createTempCopy - If true then the engine will make a temporary copy of the data file for its own use. This allows the original to be updated while the engine continues processing.
Returns
The new DataFileConfiguration instance

◆ Build() [2/2]

TConfig FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.Build ( byte []   data )

Called to indicate that configuration of this file is complete and the user can continue to configure the engine that the data file will be used by.

Parameters
data - A byte array containing the data that would normally be in a data file. If this argument is null then, before starting processing, the engine will download the latest version of the datafile using the configured auto-update settings.
Returns
The new DataFileConfiguration instance

◆ SetAutoUpdate()

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetAutoUpdate ( bool   enabled )

Enable or disable automatic updates for this engine.

Parameters
enabled - If true, the engine will update it's data file with no manual intervention. If false, the engine will never update it's data file unless the manual update method is called on IDataUpdateService
Returns
This builder instance.

◆ SetDataFileIdentifier()

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetDataFileIdentifier ( string   identifier )

Set the identifier of the data file that this configuration information applies to.

If the engine only supports a single data file then this value will be ignored.

Parameters
identifier - The identifier to use.
Returns
This builder instance.

◆ SetDataFileSystemWatcher()

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetDataFileSystemWatcher ( bool   enabled )

The DataUpdateService has the ability to watch a data file on disk and automatically refresh the engine as soon as the file is updated.

This setting enables/disables that feature.

The AutoUpdate feature must also be enabled in order for the file system watcher to work. If the engine is built from a byte[] then this setting does nothing.

Parameters
enabled - The cache configuration to use.
Returns
This builder instance.

◆ SetDataUpdateDecompress()

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetDataUpdateDecompress ( bool   decompress )

Set a value indicating if the DataUpdateService should expect content from the configured data update URL to be compressed or not.

Parameters
decompress - True if the content from the data update URL needs to be decompressed. False otherwise.
Returns
This builder instance.

◆ SetDataUpdateVerifyMd5()

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetDataUpdateVerifyMd5 ( bool   verify )

Set a value indicating if the DataUpdateService should expect the response from the data update URL to contain a 'content-md5' HTTP header that can be used to verify the integrity of the content.

Parameters
verify - True if the content should be verified with the Md5 hash. False otherwise.
Returns
This builder instance.

◆ SetUpdateOnStartup()

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetUpdateOnStartup ( bool   enabled )

Configure the data file to update on startup or not.

Parameters
enabled - If true then when this file is registered with the data update service, it will immediately try to download the latest copy of the file. This action will block execution until the download is complete and the engine has loaded the new file.

◆ SetUpdatePollingInterval() [1/2]

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetUpdatePollingInterval ( int   pollingIntervalSeconds )

Set the time between checks for a new data file made by the DataUpdateService.

Default = 30 minutes.

Generally, the DataUpdateService will not check for a new data file until the 'expected update time' that is stored in the current data file. This interval is the time to wait between checks after that time if no update is initially found. If automatic updates are disabled then this setting does nothing.

Parameters
pollingIntervalSeconds - The number of seconds between checks.
Returns
This builder instance.

◆ SetUpdatePollingInterval() [2/2]

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetUpdatePollingInterval ( TimeSpan   pollingInterval )

Set the time between checks for a new data file made by the DataUpdateService.

Default = 30 minutes.

Generally, the DataUpdateService will not check for a new data file until the 'expected update time' that is stored in the current data file. This interval is the time to wait between checks after that time if no update is initially found. If automatic updates are disabled then this setting does nothing.

Parameters
pollingInterval - The time between checks.
Returns
This builder instance.

◆ SetUpdateRandomisationMax() [1/2]

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetUpdateRandomisationMax ( int   maximumDeviationSeconds )

A random element can be added to the DataUpdateService polling interval.

This option sets the maximum length of this random addition. Default = 10 minutes.

Parameters
maximumDeviationSeconds - The maximum time added to the data update polling interval.
Returns
This builder instance.

◆ SetUpdateRandomisationMax() [2/2]

TBuilder FiftyOne.Pipeline.Engines.Configuration.DataFileConfigurationBuilderBase< TBuilder, TConfig >.SetUpdateRandomisationMax ( TimeSpan   maximumDeviation )

A random element can be added to the DataUpdateService polling interval.

This option sets the maximum length of this random addition. Default = 10 minutes.

Parameters
maximumDeviation - The maximum time added to the data update polling interval.
Returns
This builder instance.

Property Documentation