示例#1
0
        /// <summary>
        /// Construct a new instance of the Hash engine.
        /// </summary>
        /// <param name="loggerFactory">Logger to use</param>
        /// <param name="deviceDataFactory">
        /// Method used to get an aspect data instance
        /// </param>
        /// <param name="dataFile">Meta data related to the data file</param>
        /// <param name="config">Configuration instance</param>
        /// <param name="properties">Properties to be initialised</param>
        /// <param name="tempDataFilePath">
        /// The directory to use when storing temporary copies of the
        /// data file(s) used by this engine.
        /// </param>
        /// <param name="swigFactory">
        /// The factory object to use when creating swig wrapper instances.
        /// Usually a <see cref="SwigFactory"/> instance.
        /// Unit tests can override this to mock behaviour as needed.
        /// </param>
        internal DeviceDetectionHashEngine(
            ILoggerFactory loggerFactory,
            IAspectEngineDataFile dataFile,
            IConfigSwigWrapper config,
            IRequiredPropertiesConfigSwigWrapper properties,
            Func <IPipeline, FlowElementBase <IDeviceDataHash, IFiftyOneAspectPropertyMetaData>, IDeviceDataHash> deviceDataFactory,
            string tempDataFilePath,
            ISwigFactory swigFactory)
            : base(
                loggerFactory.CreateLogger <DeviceDetectionHashEngine>(),
                deviceDataFactory,
                tempDataFilePath)
        {
            _config = config;
            _propertiesConfigSwig = properties;
            _swigFactory          = swigFactory;

            AddDataFile(dataFile);
        }
 public IEngineSwigWrapper CreateEngine(string fileName,
                                        IConfigSwigWrapper config,
                                        IRequiredPropertiesConfigSwigWrapper requiredProperties)
 {
     return(EngineFromFile(fileName, config, requiredProperties));
 }
 public IEngineSwigWrapper CreateEngine(byte[] data, int dataSize,
                                        IConfigSwigWrapper config,
                                        IRequiredPropertiesConfigSwigWrapper requiredProperties)
 {
     return(EngineFromData(data, dataSize, config, requiredProperties));
 }