◆ SingleFileAspectEngineBuilderBase()
FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SingleFileAspectEngineBuilderBase | ( | IDataUpdateService | dataUpdateService | ) |
Constructor
- Parameters
-
- dataUpdateService - The IDataUpdateService instance to use when checking for data updates. If null is passed then data updates functionality will be unavailable.
Member Function Documentation
◆ Build() [1/3]
virtual TEngine FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.Build ( string datafile, bool createTempDataCopy ) virtualBuild an engine using the current options and the specified data file.
Also registers the data file with the data update service.
- Parameters
-
- datafile -
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.
- Parameters
-
- createTempDataCopy - If true, the engine will create a copy of the data file in a temporary location rather than using the file provided directly. If not loading all data into memory, this is required for automatic data updates to occur.
- Returns
- An IAspectEngine
◆ Build() [2/3]
virtual TEngine FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.Build ( Stream data ) virtualBuild an engine using the current options and the specified byte array.
Also registers the data file with the data update service.
- Parameters
-
- data - A Stream 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
- An IAspectEngine.
◆ Build() [3/3]
virtual TEngine FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.Build ( ) protected virtualBuild an engine using the configured options.
Also registers the data file with the data update service.
- Returns
- An IAspectEngine.
◆ SetAutoUpdate()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.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.
◆ SetDataFileSystemWatcher()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.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.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.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.
◆ SetDataUpdateLicenseKey()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateLicenseKey ( string key ) Set the license key to use when updating the Engine's data file.
- Parameters
-
- key - 51Degrees license key. This parameter can be set to null, but doing so will disable automatic updates for this file.
- Returns
- This builder
◆ SetDataUpdateLicenseKeys()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateLicenseKeys ( string [] keys ) Set the license keys to use when updating the Engine's data file.
- Parameters
-
- keys - 51Degrees license keys
- Returns
- This builder
◆ SetDataUpdateOnStartup()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateOnStartup ( bool enabled ) key )
Set the license key to use when updating the Engine's data file.
- Parameters
-
- key - 51Degrees license key. This parameter can be set to null, but doing so will disable automatic updates for this file.
- Returns
- This builder
◆ SetDataUpdateLicenseKeys()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateLicenseKeys ( string [] keys ) Set the license keys to use when updating the Engine's data file.
- Parameters
-
- keys - 51Degrees license keys
- Returns
- This builder
◆ SetDataUpdateOnStartup()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateOnStartup ( 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.
- Returns
- This builder
◆ SetDataUpdateUrl() [1/2]
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateUrl ( string url ) Configure the engine to use the specified URL when looking for an updated data file.
- Parameters
-
- url - The URL to check for a new data file.
- Returns
- This builder instance.
◆ SetDataUpdateUrl() [2/2]
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateUrl ( Uri url ) Configure the engine to use the specified URL when looking for an updated data file.
- Parameters
-
- url - The URL to check for a new data file.
- Returns
- This builder instance.
◆ SetDataUpdateUrlFormatter()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetDataUpdateUrlFormatter ( IDataUpdateUrlFormatter formatter ) Specify a IDataUpdateUrlFormatter to be used by the DataUpdateService when building the complete URL to query for updated data.
- Parameters
-
- formatter - The formatter to use.
- Returns
- This builder instance.
◆ SetDataUpdateVerifyMd5()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.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.
◆ SetUpdatePollingInterval() [1/2]
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.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.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.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.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.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.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.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.
◆ SetVerifyIfModifiedSince()
TBuilder FiftyOne.Pipeline.Engines.FlowElements.SingleFileAspectEngineBuilderBase< TBuilder, TEngine >.SetVerifyIfModifiedSince ( bool enabled ) Set if DataUpdateService sends the If-Modified-Since header in the request for a new data file.
- Parameters
-
- enabled - Whether to use the If-Modified-Since header.
- Returns
- This builder instance.