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


C# IDbFactory类代码示例

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


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

示例1: WithSqlStorages

 public static IConfigureHost WithSqlStorages(this IConfigureHost host,IDbFactory connection ,Action<StoragesConfiguration> cfgAction)
 {
     cfgAction.MustNotBeNull();
     var cfg=new StoragesConfiguration(host,connection);
     cfgAction(cfg);
     return host;
 }
开发者ID:DomainBus,项目名称:DomainBus.Sql,代码行数:7,代码来源:Extensions.cs

示例2: CreateConnectionSettingsWidget

		protected override ConnectionSettingsWidget CreateConnectionSettingsWidget (IDbFactory factory)
		{
			connectionWidget = new ConnectionSettingsWidget (factory);
			connectionWidget.ShowSettings (factory.GetDefaultConnectionSettings ());
			connectionWidget.EnableTestButton = false;
			return connectionWidget;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:NpgsqlCreateDatabaseDialog.cs

示例3: AzureProcessor

 public AzureProcessor(IDbConnection connection, IMigrationGenerator generator, IAnnouncer announcer, IMigrationProcessorOptions options, IDbFactory factory)
     : base(generator, announcer, options)
 {
     this.factory = factory;
      Connection = connection;
      connection.Open();
 }
开发者ID:fire-eagle,项目名称:fluentmigrator,代码行数:7,代码来源:AzureProcessor.cs

示例4: GenericProcessorBase

 protected GenericProcessorBase(IDbConnection connection, IDbFactory factory
                                , IMigrationGenerator generator, IAnnouncer announcer, IMigrationProcessorOptions options)
     : base(generator, announcer, options)
 {
     Connection = connection;
     Factory = factory;
 }
开发者ID:kevin3274,项目名称:fluentmigrator,代码行数:7,代码来源:GenericProcessorBase.cs

示例5: SetUp

		protected void SetUp(IDbFactory dbFactory)
		{
			this.Factory = dbFactory;
			this.Connection = this.Factory.CreateConnection(IntegrationTestOptions.Oracle.ConnectionString);
			this.Processor = new OracleProcessor(this.Connection, new OracleGenerator(), new TextWriterAnnouncer(System.Console.Out), new ProcessorOptions(), this.Factory);
			this.Connection.Open();
		}
开发者ID:SaltyDH,项目名称:fluentmigrator,代码行数:7,代码来源:OracleConstraintTestsBase.cs

示例6: NpgsqlCreateDatabaseDialog

		public NpgsqlCreateDatabaseDialog (IDbFactory factory):base(factory)
		{
			createDBWidget = new NpgsqlCreateDatabaseWidget ();
			Notebook.AppendPage (createDBWidget, 
			                     new Label (AddinCatalog.GetString ("Database Properties")));
			Notebook.ShowTabs = true;
			Gtk.Notebook nb = Notebook;
			
			nb.SwitchPage += delegate(object o, SwitchPageArgs args) {
				if (nb.CurrentPage == 1)
					if (!connectionWidget.ValidateFields ())
					{
						nb.CurrentPage = 0;
						MessageService.ShowError (this, 
							AddinCatalog.GetString ("Set the connection properties before the database properties."));
					} else {
						Initialize (factory);
						if (DatabaseConnection.ConnectionPool.HasErrors) {
							MessageService.ShowError (DatabaseConnection.ConnectionPool.Error);
							nb.CurrentPage = 0;
							return;
						}
						createDBWidget.Initialize ((NpgsqlSchemaProvider)DatabaseConnection.SchemaProvider);
					}
			};
			
			Notebook.ShowAll ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:28,代码来源:NpgsqlCreateDatabaseDialog.cs

示例7: SqlServerProcessor

 public SqlServerProcessor(DbConnection connection, IMigrationGenerator generator, IAnnouncer announcer, IMigrationProcessorOptions options, IDbFactory factory)
     : base(generator, announcer, options)
 {
     this.factory = factory;
     Connection = connection;
     connection.Open();
     BeginTransaction();
 }
开发者ID:remids,项目名称:fluentmigrator,代码行数:8,代码来源:SqlServerProcessor.cs

示例8: DatabaseConnectionSettingsDialog

		public DatabaseConnectionSettingsDialog (IDbFactory factory, DatabaseConnectionSettings settings)
			: this (factory, true)
		{
			if (settings == null)
				throw new ArgumentNullException ("settings");

			settingsWidget.ShowSettings (settings);
			settingsWidget.AppendDatabase (settings);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:9,代码来源:DatabaseConnectionSettingsDialog.cs

示例9: UnitOfWork

        public UnitOfWork(IDbFactory dbFactory)
        {
            if (dbFactory == null)
            {
                throw new ArgumentNullException("dbFactory");
            }

            _dbFactory = dbFactory;
        }
开发者ID:gcheney,项目名称:super-chef,代码行数:9,代码来源:UnitOfWork.cs

示例10: SqliteConnectionSettingsWidget

		internal SqliteConnectionSettingsWidget (IDbFactory factory, bool isEditMode)
			: base (factory, isEditMode)
		{
			EnableServerEntry = false;
			EnablePortEntry = false;
			EnableUsernameEntry = false;
			EnablePasswordEntry = false;
			EnableRefreshButton = false;
			EnableOpenButton = true;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:10,代码来源:SqliteConnectionSettingsWidget.cs

示例11: DbDatabasePopulator

        public DbDatabasePopulator(IDbFactory dbFactory, string connectionString)
        {
            if (dbFactory == null)
                throw new ArgumentNullException("dbFactory");
            if (connectionString == null)
                throw new ArgumentNullException("connectionString");

            this.dbFactory = dbFactory;
            this.connectionString = connectionString;
        }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:10,代码来源:DbDatabasePopulator.cs

示例12: PostgresProcessor

        public PostgresProcessor(IDbConnection connection, IMigrationGenerator generator, IAnnouncer announcer, IMigrationProcessorOptions options, IDbFactory factory)
            : base(generator, announcer, options)
        {
            this.factory = factory;
            Connection = connection;
            connection.Open();

            Announcer.Say("Beginning Transaction");
            Transaction = Connection.BeginTransaction();
        }
开发者ID:hazzik,项目名称:fluentmigrator,代码行数:10,代码来源:PostgresProcessor.cs

示例13: Initialize

		private void Initialize (IDbFactory factory)
		{
			if (DatabaseConnection != null)
				DatabaseConnection.ConnectionPool.Close ();
			DatabaseConnectionSettings settings = new DatabaseConnectionSettings(connectionWidget.ConnectionSettings);
			settings.Database = "mysql"; 
			// Create Context, Pool, Connection 
			DatabaseConnectionContext ctx = new DatabaseConnectionContext (settings, true);
			ctx.ConnectionPool.Initialize ();
			this.DatabaseConnection = ctx;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:11,代码来源:MySqlCreateDatabaseDialog.cs

示例14: ReceiveFromClientsBySql

        public static void ReceiveFromClientsBySql(this DispatchServerConfiguration cfg,IDbFactory connection,string table=CommunicatorTable,string dbSchema=CommunicatorSchema)
        {
            new ClientToServerRowCreator(connection).WithTableName(table, dbSchema).IfExists(TableExistsAction.Ignore).Create();
            var configReceiver = new ConfigReceiver(connection);
           
            cfg.EndpointUpdatesNotifier=configReceiver;

            var fromClient = new ReceiverFromClient(connection);
           
            cfg.MessageNotifier = fromClient;
        }
开发者ID:DomainBus,项目名称:DomainBus.Sql,代码行数:11,代码来源:Extensions.cs

示例15: DbAdministratorBase

		/// <summary>
		/// Initializes an instance of <see cref="DbAdministratorBase"/> with the connection string.
		/// </summary>
		/// <param name="connectionString">Connection string to the SQL server without initial catalog</param>
		/// <param name="databaseName">Catalog name</param>
        /// <param name="factory">The factory to use.</param>
		/// <exception cref="ArgumentNullException">
		/// <paramref name="connectionString"/> is a null reference (Nothing in Visual Basic)
		/// </exception>
        public DbAdministratorBase(string connectionString, string databaseName, IDbFactory factory)
        {
			if (connectionString==null)
				throw new ArgumentNullException("connectionString");
			if (databaseName==null)
				throw new ArgumentNullException("databaseName");
			if(factory==null)
				throw new ArgumentNullException("factory");
			this.connectionString=connectionString.TrimEnd(';');
			this.databaseName=databaseName;
			this.factory=factory;
		}
开发者ID:timonela,项目名称:mb-unit,代码行数:21,代码来源:DbAdministratorBase.cs


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