当前位置: 首页>>代码示例>>C#>>正文


C# IDataProvider.SetDataProviderConfiguration方法代码示例

本文整理汇总了C#中IDataProvider.SetDataProviderConfiguration方法的典型用法代码示例。如果您正苦于以下问题:C# IDataProvider.SetDataProviderConfiguration方法的具体用法?C# IDataProvider.SetDataProviderConfiguration怎么用?C# IDataProvider.SetDataProviderConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDataProvider的用法示例。


在下文中一共展示了IDataProvider.SetDataProviderConfiguration方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DoInitialize

        protected override void DoInitialize()
        {
            logger.Info("Инициализация...");
            var appPath = Application.StartupPath + "/";
            dimentionConfiguration = new NHibernateDimentionConfigurationImpl();
            dataProviderConfiguration = new XmlDataProviderConfigurationImpl(appPath + "Settings/OpcConfiguration.xml");
            sensorConfiguration = new XmlSensorConfigurationImpl(appPath + "Settings/SensorConfiguration.xml");

            dataProvider = new OpcDataProviderImpl();
            calibrator = new CalibratorImpl();
            //dataProvider = new EmulatorDataProvider();
            //calibrator = dataProvider as ICalibrator;

            slabBuilder = new SlabBuilderImpl();
            dimentionCalculator = new DimentionCalculatorImpl();
            sensorValueContainer = new SensorValueContainerImpl();
            dimentionValueContainer = new DimentionValueContainerImpl();
            standartSizeReaderWriter = new NHibernateStandartSizeReaderWriter();
            regulationsReaderWriter = new NHibernateRegulationReaderWriter();

            sensorValueReaderWriter = new NHibernateSensorValueWriter();
            dimentionValueWriter = new NHibernateDimentionValueWriter();
            slabWriter = new NHibernateSlabInfoWriter();
            slabReader = slabWriter as ISlabInfoReader;

            //dataCleaner = new NHibernateDataCleanerImpl();
            //dataCleaner.SetSlabInfoWriter(slabWriter);

            sensorValueContainer.SunbscribeContainerListener(this);

            dataProvider.SetSensorConfiguration(sensorConfiguration);
            dataProvider.SetSensorValueContainer(sensorValueContainer);
            dataProvider.SetDataProviderConfiguration(dataProviderConfiguration);
            dataProvider.SubscribeDataProviderListener(this);

            slabBuilder.SetCalibrator(calibrator);
            slabBuilder.SetSensorConfiguration(sensorConfiguration);
            slabBuilder.SetSensorValueContainer(sensorValueContainer);

            dimentionCalculator.SetDimentionConfiguration(dimentionConfiguration);
            dimentionCalculator.SetDimentionValueContainer(dimentionValueContainer);

            // Для построения точек при запросе пользователя.
            userSensorValueContainer = new SensorValueContainerImpl();
            userSlabBuilder = new SlabBuilderImpl();
            userSlabBuilder.SetSensorValueContainer(userSensorValueContainer);
            userSlabBuilder.SetSensorConfiguration(sensorConfiguration);
            userSlabBuilder.SetCalibrator(calibrator);

            dimentionConfiguration.Initialize();
            standartSizeReaderWriter.Initialize();
            regulationsReaderWriter.Initialize();
            dataProviderConfiguration.Initialize();
            sensorConfiguration.Initialize();
            sensorValueReaderWriter.Initialize();
            slabWriter.Initialize();
            dimentionValueWriter.Initialize();
            dimentionCalculator.Initialize();
            calibrator.Initialize();
            slabBuilder.Initialize();
            userSlabBuilder.Initialize();
            //dataCleaner.Initialize();
            dataProvider.Initialize();

            logger.Info("Инициализация завершена.");
        }
开发者ID:desla,项目名称:SlabGeometryControl,代码行数:66,代码来源:GCSServer.cs


注:本文中的IDataProvider.SetDataProviderConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。