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


C# IDriver类代码示例

本文整理汇总了C#中IDriver的典型用法代码示例。如果您正苦于以下问题:C# IDriver类的具体用法?C# IDriver怎么用?C# IDriver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: SaveDriver

        public OpResult SaveDriver(IDriver newDriver)
        {
            OpResult result = OpResult.Success;

            if (newDriver == null)
                result = OpResult.NullParameter;

            if (result == OpResult.Success)
            {
                if(newDriver.Validate())
                {
                    try
                    {
                        result = _dataProvider.Save(newDriver);
                    }
                    catch (Exception ex)
                    {
                        result = OpResult.ExceptionOccurred;
                        _logger.TraceException(ex.Message, ex);
                    }
                }
                else
                {
                    result = OpResult.InvalidParameters;
                }
            }
            return result;
        }
开发者ID:smclark,项目名称:DriverManager,代码行数:28,代码来源:DriverListModel.cs

示例2: ReturnElements

        public IEnumerable<IElement> ReturnElements(IDriver driver)
        {
            IEnumerable<IElement> elements = null;
            if (SelectorType == SelectorType.Name)
            {
                elements = driver.FindElementsByXpath(SelectorValue);
            }

            if (SelectorType == SelectorType.Id)
            {
                elements = driver.FindElementsById(SelectorValue);

            }

            if (SelectorType == SelectorType.ClassName)
            {
                elements = driver.FindElementsByCss(SelectorValue);
            }

            if (SelectorType == SelectorType.XPath)
            {
                elements = driver.FindElementsByXpath(SelectorValue);
            }

            if (elements == null)
                throw new InvalidOperationException(this.SelectorValue);

            return elements;
        }
开发者ID:dburriss,项目名称:UiMatic,代码行数:29,代码来源:Selector.cs

示例3: SqlMapperPersistenceEngine

        public SqlMapperPersistenceEngine(string connectionString, IDriver driver, DBDialect dialect, Mapping mapping, ArrayList cacheEntries, Models.Model model)
        {
            if (connectionString == null)
            {
                throw new ArgumentNullException("connectionString");
            }
            if (driver == null)
            {
                throw new ArgumentNullException("driver");
            }
            if (dialect == null)
            {
                throw new ArgumentNullException("dialect");
            }
            if (mapping == null)
            {
                throw new ArgumentNullException("mapping");
            }
            this.Driver = driver;
            this.Dialect = dialect;
            this._Mapping = mapping;
            this._Connection = this._Driver.CreateConnection(connectionString);

            if (_Connection is Evaluant.Uss.Data.FileClient.FileConnection)
            {
                ((Evaluant.Uss.Data.FileClient.FileConnection)_Connection).Dialect = dialect;
            }

            base._Model = model;
            this._CacheEntries = cacheEntries;
            this.Initialize();
        }
开发者ID:npenin,项目名称:uss,代码行数:32,代码来源:SqlMapperPersistenceEngine.cs

示例4: ReturnElement

        public IElement ReturnElement(IDriver driver)
        {
            IElement el = null;
            if(SelectorType == SelectorType.Name)
            {
                el = driver.FindByName(SelectorValue);
            }

            if(SelectorType == SelectorType.Id)
            {
                el = driver.FindById(SelectorValue);
            }

            if(SelectorType == SelectorType.ClassName)
            {
                el = driver.FindByCss(SelectorValue);
            }

            if (SelectorType == SelectorType.XPath)
            {
                el = driver.FindByXpath(SelectorValue);
            }

            if (el == null)
                throw new InvalidOperationException(this.SelectorValue);

            return el;
        }
开发者ID:dburriss,项目名称:UiMatic,代码行数:28,代码来源:Selector.cs

示例5: synchronize

 public static string synchronize(bool isJS, IDriver driver, IEnumerable<BuildIds> buildIds, IEnumerable<Langs> locs) {
   var src = buildEnvelopes.adjust();
   var dest = driver.readMap();
   var delta = src.synchronize(dest, isJS, buildIds, locs);
   if (delta == null) return "Up-to-date";
   driver.update(delta);
   return string.Format("Deleted: {0}, updated: {1}, inserted: {2}", delta.delete.Count, delta.update.Count, delta.insert.Count);
 }
开发者ID:PavelPZ,项目名称:NetNew,代码行数:8,代码来源:SynchronizeDirs.cs

示例6: Up

 public override void Up(IDriver driver, ILogger logger, ISchemaInfo schemaInfo)
 {
     using (var trans = driver.Database.BeginTransaction())
     {
         base.Up(driver, logger, schemaInfo);
         trans.Commit();
     }
 }
开发者ID:geofflane,项目名称:zorched-migrations,代码行数:8,代码来源:TransactionalMigration.cs

示例7: Init

 public static void Init(ILogger logger = null, IAssert assert = null,
     TimeoutSettings timeouts = null, IDriver<IWebDriver> driverFactory = null)
 {
     DriverFactory = driverFactory ?? new WebDriverFactory();
     Asserter = assert ?? new WebAssert();
     Timeouts = timeouts ?? new WebTimeoutSettings();
     Logger = logger ?? new LogAgregator(new NUnitLogger(), new Log4Net());
     MapInterfaceToElement.Init(DefaultInterfacesMap);
 }
开发者ID:epam,项目名称:JDI,代码行数:9,代码来源:WebSettings.cs

示例8: CheckDriver

		static bool CheckDriver(IDriver driver)
		{
			if (!driver.IsExistLicence | !driver.IsExistCarDocuments)
			{
				return false;
			}

			return true;
		}
开发者ID:AlehSkamarokhau,项目名称:PrototypeApps,代码行数:9,代码来源:Program.cs

示例9: BasePawn

        private Model _collisionSphereModel; //sometimes not used if collision shere display is comented out

        #endif

        #region Constructors

        public BasePawn(string resourcePath, IDriver driver = null, Vector3 rotation= new Vector3())
        {
            _resourcePath = resourcePath;
            CollisionsHelper = ServiceLocator.Current.GetInstance<CollisionHelper>();

            Movement = new Vector3();
            Driver = driver;
            Rotation = rotation;
        }
开发者ID:ChaosSlave51,项目名称:StarMelee,代码行数:15,代码来源:BasePawn.cs

示例10: GetParamters

 public System.Data.IDataParameter[] GetParamters(object data,IDriver driver)
 {
     IDataParameter[] parameters = new IDataParameter[mParameters.Count];
     for (int i = 0; i < mParameters.Count; i++)
     {
         ProcParameterAttribute procp = mParameters[i];
         parameters[i] = driver.CreateProcParameter(procp.Name,
             procp.Handler.Get(data), procp.Direction);
     }
     return parameters;
 }
开发者ID:hdxhan,项目名称:IKendeLib,代码行数:11,代码来源:ProcBuilder.cs

示例11: CreateCommand

 public IDbCommand CreateCommand(IDriver driver)
 {
     IDbCommand cmd = driver.Command;
     cmd.CommandText = driver.ReplaceSql(SqlText.ToString());
     cmd.CommandType = CommandType;
     DbCommand = cmd;
     foreach (Parameter p in Parameters)
     {
         cmd.Parameters.Add(driver.CreateParameter(p.Name, p.Value, p.Direction));
     }
     return cmd;
 }
开发者ID:shoy160,项目名称:Shoy.Common,代码行数:12,代码来源:Command.cs

示例12: YandexTest

        public YandexTest(Configuration config, IDriver driver)
            : base(config, driver)
        {
            this.loginPage = new LoginPage(driver, config);

            this.userName = config.Get[Configuration.UserName];
            this.password = config.Get[Configuration.Password];
            this.recipient = config.Get[Configuration.Recipient];
            this.subject = config.Get[Configuration.BrowserName] + " test " +
                           DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss");
            this.message = config.Get[Configuration.Message];
        }
开发者ID:ograchikov,项目名称:MailDriver,代码行数:12,代码来源:YandexTest.cs

示例13: BasePlayerShip

        public BasePlayerShip(ShmupGameState gameState,IDriver<BasePlayerShip> driver)
            : base("Models/Ships/p1_saucer", gameState, driver)
        {
            _gameState = gameState;

            CollisionSpheres = new List<BoundingSphere>() { new BoundingSphere(new Vector3(), 700) };

             SpeedSide=100.0f;
             SpeedForward = 100.0f;
             SpeedBack = 100.0f;
            MaxBank=MathHelper.ToRadians(45);
            EnterBankTime = 20;
            ExitBankTime = 40;
        }
开发者ID:ChaosSlave51,项目名称:StarMelee,代码行数:14,代码来源:BasePlayerShip.cs

示例14: OnSetUp

		protected override void OnSetUp()
		{
			driverClass = (string)cfg.Properties["hibernate.connection.driver_class"];
			if(driverClass.IndexOf(",") < 0) 
			{
				driverClass += ", NHibernate";
			}

			driver = (IDriver)Activator.CreateInstance(System.Type.GetType(driverClass));

			string prepare = (string)cfg.Properties[ Cfg.Environment.PrepareSql ] as string;
			if( prepare=="true" )
			{
				prepareSql = true;
			}
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:16,代码来源:PerformanceTest.cs

示例15: Delete

        /// <summary>
        /// Deletes the specified driver.
        /// </summary>
        /// <param name="driver">The driver</param>
        /// <exception cref="ArgumentNullException">NULL Driver passed into method</exception>
        /// <returns></returns>
        public OpResult Delete(IDriver driver)
        {
            OpResult result = OpResult.Success;

            if (driver == null)
                result = OpResult.NullParameter;

            if (result == OpResult.Success)
            {
                if (_drivers.Contains(driver))
                    _drivers.Remove(driver);
                else
                    result = OpResult.ObjectNotExists;
            }

            return result;
        }
开发者ID:smclark,项目名称:DriverManager,代码行数:23,代码来源:DriverDataProvider.cs


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