Пример #1
0
 public RequiredPropertiesConfigSwig(VectorStringSwig properties) : this(DeviceDetectionHashEngineModulePINVOKE.new_RequiredPropertiesConfigSwig__SWIG_1(VectorStringSwig.getCPtr(properties)), true)
 {
     if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
     {
         throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public VectorStringSwig(VectorStringSwig other) : this(DeviceDetectionHashEngineModulePINVOKE.new_VectorStringSwig__SWIG_1(VectorStringSwig.getCPtr(other)), true)
 {
     if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
     {
         throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public VectorStringSwigEnumerator(VectorStringSwig collection)
 {
     collectionRef = collection;
     currentIndex  = -1;
     currentObject = null;
     currentSize   = collectionRef.Count;
 }
 public void SetRange(int index, VectorStringSwig values)
 {
     DeviceDetectionHashEngineModulePINVOKE.VectorStringSwig_SetRange(swigCPtr, index, VectorStringSwig.getCPtr(values));
     if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
     {
         throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #5
0
 public void setTempDirectories(VectorStringSwig tempDirs)
 {
     DeviceDetectionHashEngineModulePINVOKE.ConfigBaseSwig_setTempDirectories(swigCPtr, VectorStringSwig.getCPtr(tempDirs));
     if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
     {
         throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #6
0
        public VectorStringSwig getProperties()
        {
            VectorStringSwig ret = new VectorStringSwig(DeviceDetectionHashEngineModulePINVOKE.RequiredPropertiesConfigSwig_getProperties(swigCPtr), true);

            if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
            {
                throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public VectorStringSwig getDataFilesWherePresent()
        {
            VectorStringSwig ret = new VectorStringSwig(DeviceDetectionHashEngineModulePINVOKE.PropertyMetaDataSwig_getDataFilesWherePresent(swigCPtr), true);

            if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
            {
                throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #8
0
        public VectorStringSwig getValue()
        {
            VectorStringSwig ret = new VectorStringSwig(DeviceDetectionHashEngineModulePINVOKE.VectorStringValuesSwig_getValue(swigCPtr), true);

            if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
            {
                throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public static VectorStringSwig Repeat(string value, int count)
        {
            global::System.IntPtr cPtr = DeviceDetectionHashEngineModulePINVOKE.VectorStringSwig_Repeat(value, count);
            VectorStringSwig      ret  = (cPtr == global::System.IntPtr.Zero) ? null : new VectorStringSwig(cPtr, true);

            if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
            {
                throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public VectorStringSwig GetRange(int index, int count)
        {
            global::System.IntPtr cPtr = DeviceDetectionHashEngineModulePINVOKE.VectorStringSwig_GetRange(swigCPtr, index, count);
            VectorStringSwig      ret  = (cPtr == global::System.IntPtr.Zero) ? null : new VectorStringSwig(cPtr, true);

            if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
            {
                throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public VectorStringSwig getKeys()
        {
            global::System.IntPtr cPtr = DeviceDetectionHashEngineModulePINVOKE.EngineBaseSwig_getKeys(swigCPtr);
            VectorStringSwig      ret  = (cPtr == global::System.IntPtr.Zero) ? null : new VectorStringSwig(cPtr, false);

            if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
            {
                throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        /// <summary>
        /// Called by the 'BuildEngine' method to handle
        /// creation of the engine instance.
        /// </summary>
        /// <param name="properties"></param>
        /// <returns>
        /// An <see cref="IAspectEngine"/>.
        /// </returns>
        protected override DeviceDetectionHashEngine NewEngine(
            List <string> properties)
        {
            if (DataFiles.Count != 1)
            {
                throw new PipelineConfigurationException(
                          "This builder requires one and only one configured file " +
                          $"but it has {DataFileConfigs.Count}");
            }
            var dataFile = DataFiles.First();

            // We remove the data file configuration from the list.
            // This is because the on-premise engine builder base class
            // adds all the data file configs after engine creation.
            // However, the device detection data files are supplied
            // directly to the constructor.
            // Consequently, we remove it here to stop it from being added
            // again by the base class.
            DataFiles.Remove(dataFile);

            // Update the swig configuration object.
            SwigConfig.setUseUpperPrefixHeaders(false);
            if (dataFile.Configuration.CreateTempCopy && String.IsNullOrEmpty(TempDir) == false)
            {
                using (var tempDirs = new VectorStringSwig())
                {
                    tempDirs.Add(TempDir);
                    SwigConfig.setTempDirectories(tempDirs);
                }
                SwigConfig.setUseTempFile(true);
            }

            // Create swig property configuration object.
            IRequiredPropertiesConfigSwigWrapper propertyConfig = null;

            using (var vProperties = new VectorStringSwig(properties)) {
                propertyConfig = SwigFactory.CreateRequiredProperties(vProperties);
            }

            return(new DeviceDetectionHashEngine(
                       _loggerFactory,
                       dataFile,
                       SwigConfig,
                       propertyConfig,
                       CreateAspectData,
                       TempDir,
                       SwigFactory));
        }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorStringSwig obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
 public IRequiredPropertiesConfigSwigWrapper CreateRequiredProperties(
     VectorStringSwig properties)
 {
     return(RequiredPropertiesFactory(properties));
 }