• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ConfigurationPropertyHolder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: build_the_container

 public static void build_the_container(ConfigurationPropertyHolder configuration_property_holder)
 {
     Container.initialize_with(null);
     Container.initialize_with(build_items_for_container(configuration_property_holder));
     initialize_file_log_appender();
     set_logging_level_debug_when_debug(configuration_property_holder);
 }
开发者ID:StevenLiekens,项目名称:roundhouse,代码行数:7,代码来源:ApplicationConfiguraton.cs


示例2: RoundhouseRedGateCompareRunner

 public RoundhouseRedGateCompareRunner(KnownFolders known_folders, FileSystemAccess file_system, ConfigurationPropertyHolder configuration, RoundhouseMigrationRunner migration_runner)
 {
     this.known_folders = known_folders;
     this.file_system = file_system;
     this.configuration = configuration;
     this.migration_runner = migration_runner;
 }
开发者ID:Smartrak,项目名称:roundhouse,代码行数:7,代码来源:RoundhouseRedGateCompareRunner.cs


示例3: NHibernateSessionFactoryBuilder

 //private const string proxy_factory = Environment.ProxyFactoryFactoryClass;
 public NHibernateSessionFactoryBuilder(ConfigurationPropertyHolder config)
 {
     configuration_holder = config;
     func_dictionary = new Dictionary<string, Func<IPersistenceConfigurer>>();
     func_dictionary.Add("roundhouse.databases.sqlserver.SqlServerDatabase, roundhouse.databases.sqlserver",
                         () => MsSqlConfiguration.MsSql2005.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.sqlserver2000.SqlServerDatabase, roundhouse.databases.sqlserver2000",
                         () => MsSqlConfiguration.MsSql2000.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.mysql.MySqlDatabase, roundhouse.databases.mysql",
                         () => MySQLConfiguration.Standard.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.oracle.OracleDatabase, roundhouse.databases.oracle",
                         () => OracleClientConfiguration.Oracle9.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.access.AccessDatabase, roundhouse.databases.access",
                         () => JetDriverConfiguration.Standard.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.sqlite.SqliteDatabase, roundhouse.databases.sqlite",
                         () => SQLiteConfiguration.Standard.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.postgresql.PostgreSQLDatabase, roundhouse.databases.postgresql",
                         () => PostgreSQLConfiguration.Standard.ConnectionString(configuration_holder.ConnectionString));
     // merged
     string merged_assembly_name = ApplicationParameters.get_merged_assembly_name();
     func_dictionary.Add("roundhouse.databases.sqlserver.SqlServerDatabase, " + merged_assembly_name,
                         () => MsSqlConfiguration.MsSql2005.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.sqlserver2000.SqlServerDatabase, " + merged_assembly_name,
                         () => MsSqlConfiguration.MsSql2000.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.mysql.MySqlDatabase, " + merged_assembly_name,
                         () => MySQLConfiguration.Standard.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.oracle.OracleDatabase, " + merged_assembly_name,
                         () => OracleClientConfiguration.Oracle9.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.access.AccessDatabase, " + merged_assembly_name,
                         () => JetDriverConfiguration.Standard.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.sqlite.SqliteDatabase, " + merged_assembly_name,
                         () => SQLiteConfiguration.Standard.ConnectionString(configuration_holder.ConnectionString));
     func_dictionary.Add("roundhouse.databases.postgresql.PostgreSQLDatabase, " + merged_assembly_name,
                         () => PostgreSQLConfiguration.Standard.ConnectionString(configuration_holder.ConnectionString));
 }
开发者ID:nelsestu,项目名称:roundhouse,代码行数:36,代码来源:NHibernateSessionFactoryBuilder.cs


示例4: build

        public static KnownFolders build(FileSystemAccess file_system, ConfigurationPropertyHolder configuration_property_holder)
        {
            MigrationsFolder alter_database_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                     configuration_property_holder.AlterDatabaseFolderName,false,false);
            MigrationsFolder run_after_create_database_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                     configuration_property_holder.RunAfterCreateDatabaseFolderName,true,false);
            MigrationsFolder up_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                     configuration_property_holder.UpFolderName, true, false);
            MigrationsFolder down_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                       configuration_property_holder.DownFolderName, true, false);
            MigrationsFolder run_first_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                            configuration_property_holder.RunFirstAfterUpFolderName, false, false);
            MigrationsFolder functions_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                            configuration_property_holder.FunctionsFolderName, false, false);
            MigrationsFolder views_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                        configuration_property_holder.ViewsFolderName, false, false);
            MigrationsFolder sprocs_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                         configuration_property_holder.SprocsFolderName, false, false);
            MigrationsFolder indexes_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                         configuration_property_holder.IndexesFolderName, false, false);

            MigrationsFolder runAfterOtherAnyTimeScripts_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                         configuration_property_holder.RunAfterOtherAnyTimeScriptsFolderName, false, false);

            MigrationsFolder permissions_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory,
                                                                              configuration_property_holder.PermissionsFolderName, false, true);
            Folder change_drop_folder = new DefaultFolder(file_system, combine_items_into_one_path(file_system,
                                                                                                   configuration_property_holder.OutputPath,
                                                                                                   configuration_property_holder.DatabaseName,
                                                                                                   configuration_property_holder.ServerName),
                                                          get_run_date_time_string());

            return new DefaultKnownFolders(alter_database_folder, run_after_create_database_folder,up_folder, down_folder, run_first_folder, functions_folder, views_folder, sprocs_folder, indexes_folder,
                runAfterOtherAnyTimeScripts_folder, permissions_folder, change_drop_folder);
        }
开发者ID:x97mdr,项目名称:roundhouse,代码行数:35,代码来源:KnownFoldersBuilder.cs


示例5: initialize_connections

        public override void initialize_connections(ConfigurationPropertyHolder configuration_property_holder)
        {
            if (!string.IsNullOrEmpty(connection_string))
            {
                string[] parts = connection_string.Split(';');
                foreach (string part in parts)
                {
                    if (string.IsNullOrEmpty(server_name) && (part.to_lower().Contains("server") || part.to_lower().Contains("data source")))
                    {
                        server_name = part.Substring(part.IndexOf("=") + 1);
                    }

                    if (string.IsNullOrEmpty(database_name) && (part.to_lower().Contains("database") || part.to_lower().Contains("database")))
                    {
                        database_name = part.Substring(part.IndexOf("=") + 1);
                    }
                }
            }

            configuration_property_holder.ConnectionString = connection_string;

            set_provider();
            if (string.IsNullOrEmpty(admin_connection_string))
            {
                var builder = new MySqlConnectionStringBuilder(connection_string);
                builder.Database = "information_schema";
                admin_connection_string = builder.ConnectionString;
            }
        }
开发者ID:mjmeintjes,项目名称:roundhouse,代码行数:29,代码来源:MySqlDatabase.cs


示例6: build

        public static KnownFolders build(FileSystemAccess file_system, ConfigurationPropertyHolder configuration_property_holder)
        {
            MigrationsFolder alter_database_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.AlterDatabaseFolderName, false, false, "AlterDatabase");
            MigrationsFolder run_after_create_database_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.RunAfterCreateDatabaseFolderName, true, false, "Run After Create Database");
	        MigrationsFolder run_before_up_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.RunBeforeUpFolderName, false, false, "Run Before Update");
	        MigrationsFolder up_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.UpFolderName, true, false, "Update");
            MigrationsFolder down_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.DownFolderName, true, false, "Down Folder - Nothing to see here. Move along.");
            MigrationsFolder run_first_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.RunFirstAfterUpFolderName, false, false, "Run First After Update");
            MigrationsFolder functions_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.FunctionsFolderName, false, false, "Function");
            MigrationsFolder views_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.ViewsFolderName, false, false, "View");
            MigrationsFolder sprocs_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.SprocsFolderName, false, false, "Stored Procedure");
            MigrationsFolder indexes_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.IndexesFolderName, false, false, "Index");
            MigrationsFolder runAfterOtherAnyTimeScripts_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.RunAfterOtherAnyTimeScriptsFolderName, false, false, "Run after Other Anytime Scripts");
            MigrationsFolder permissions_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.PermissionsFolderName, false, true, "Permission");
            MigrationsFolder before_migration_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.BeforeMigrationFolderName, false, true, "BeforeMigration");
            MigrationsFolder after_migration_folder = new DefaultMigrationsFolder(file_system, configuration_property_holder.SqlFilesDirectory, configuration_property_holder.AfterMigrationFolderName, false, true, "AfterMigration");

            Folder change_drop_folder = new DefaultFolder(file_system, combine_items_into_one_path(file_system,
                                                                                                   configuration_property_holder.OutputPath,
                                                                                                   "migrations",
                                                                                                   remove_paths_from(configuration_property_holder.DatabaseName,file_system),
                                                                                                   remove_paths_from(configuration_property_holder.ServerName,file_system)),
                                                          get_run_date_time_string());

			return new DefaultKnownFolders(alter_database_folder, run_after_create_database_folder, run_before_up_folder, up_folder, down_folder, run_first_folder, functions_folder, views_folder, sprocs_folder, indexes_folder, runAfterOtherAnyTimeScripts_folder, permissions_folder, before_migration_folder, after_migration_folder, change_drop_folder);
        }
开发者ID:Smartrak,项目名称:roundhouse,代码行数:26,代码来源:KnownFoldersBuilder.cs


示例7: RoundhouseMigrationRunner

 public RoundhouseMigrationRunner(
     string repository_path,
     Environment environment,
     KnownFolders known_folders,
     FileSystemAccess file_system,
     DatabaseMigrator database_migrator,
     VersionResolver version_resolver,
     bool silent,
     bool dropping_the_database,
     bool dont_create_the_database,
     bool run_in_a_transaction,
     bool use_simple_recovery,
     ConfigurationPropertyHolder configuration)
 {
     this.known_folders = known_folders;
     this.repository_path = repository_path;
     this.environment = environment;
     this.file_system = file_system;
     this.database_migrator = database_migrator;
     this.version_resolver = version_resolver;
     this.silent = silent;
     this.dropping_the_database = dropping_the_database;
     this.dont_create_the_database = dont_create_the_database;
     this.run_in_a_transaction = run_in_a_transaction;
     this.use_simple_recovery = use_simple_recovery;
     this.configuration = configuration;
 }
开发者ID:jakcharlton,项目名称:roundhouse,代码行数:27,代码来源:RoundhouseMigrationRunner.cs


示例8: replace_tokens

        public static string replace_tokens(ConfigurationPropertyHolder configuration, string text_to_replace)
        {
            if (string.IsNullOrEmpty(text_to_replace)) return string.Empty;

            IDictionary<string, string> dictionary = create_dictionary_from_configuration(configuration);
            Regex regex = new Regex("{{(?<key>\\w+)}}");

            string output = regex.Replace(text_to_replace, m =>
            {
                string key = "";

                try
                {
                    key = m.Groups["key"].Value.to_lower();
                    var value = dictionary[key];
                    return value;
                }
                catch (Exception)
                {
                    throw;
                }
            });

            return output;
        }
开发者ID:binarymash,项目名称:roundhouse,代码行数:25,代码来源:TokenReplacer.cs


示例9: get_diff_runner

 private static RoundhouseRedGateCompareRunner get_diff_runner(ConfigurationPropertyHolder configuration, RoundhouseMigrationRunner migration_runner)
 {
     return new RoundhouseRedGateCompareRunner(
         Container.get_an_instance_of<KnownFolders>(),
         Container.get_an_instance_of<FileSystemAccess>(),
         configuration, migration_runner);
 }
开发者ID:AndersMalmgren,项目名称:roundhouse,代码行数:7,代码来源:Program.cs


示例10: DefaultEnvironmentSet

 public DefaultEnvironmentSet(ConfigurationPropertyHolder configuration_property_holder)
 {
     set_items = configuration_property_holder.EnvironmentNames
         .Split(',')
         .Where(x => !string.IsNullOrWhiteSpace(x))
         .Select(x => new DefaultEnvironment(x.Trim()))
         .ToList();
 }
开发者ID:Smartrak,项目名称:roundhouse,代码行数:8,代码来源:DefaultEnvironmentSet.cs


示例11: build

        public static VersionResolver build(FileSystemAccess file_system, ConfigurationPropertyHolder configuration_property_holder)
        {
            VersionResolver xml_version_finder = new XmlFileVersionResolver(file_system, configuration_property_holder.VersionXPath, configuration_property_holder.VersionFile);
            VersionResolver dll_version_finder = new DllFileVersionResolver(file_system, configuration_property_holder.VersionFile);
            VersionResolver script_number_version_finder = new ScriptfileVersionResolver(file_system, configuration_property_holder);

            IEnumerable<VersionResolver> resolvers = new List<VersionResolver> { xml_version_finder, dll_version_finder, script_number_version_finder };

            return new ComplexVersionResolver(resolvers);
        }
开发者ID:richardpascual,项目名称:roundhouse,代码行数:10,代码来源:VersionResolverBuilder.cs


示例12: create_dictionary_from_configuration

        private static IDictionary<string, string> create_dictionary_from_configuration(ConfigurationPropertyHolder configuration)
        {
            Dictionary<string, string> property_dictionary = new Dictionary<string, string>();
            foreach (var property in configuration.GetType().GetProperties())
            {
                property_dictionary.Add(property.Name.to_lower(), property.GetValue(configuration, null).to_string());
            }

            return property_dictionary;
        }
开发者ID:binarymash,项目名称:roundhouse,代码行数:10,代码来源:TokenReplacer.cs


示例13: MSBuildLogger

        public MSBuildLogger(ConfigurationPropertyHolder configuration)
        {
            var task = configuration as ITask;
            if (task != null)
            {
                build_engine = task.BuildEngine;
            }

            calling_task = configuration;
        }
开发者ID:Smartrak,项目名称:roundhouse,代码行数:10,代码来源:MSBuildLogger.cs


示例14: initialize_connections

        public override void initialize_connections(ConfigurationPropertyHolder configuration_property_holder)
        {
            if (!string.IsNullOrEmpty(connection_string))
            {
                string[] parts = connection_string.Split(';');
                foreach (string part in parts)
                {
                    if (string.IsNullOrEmpty(server_name) && (part.to_lower().Contains("server") || part.to_lower().Contains("data source")))
                    {
                        server_name = part.Substring(part.IndexOf("=") + 1);
                    }

                    if (string.IsNullOrEmpty(database_name) && (part.to_lower().Contains("initial catalog") || part.to_lower().Contains("database")))
                    {
                        database_name = part.Substring(part.IndexOf("=") + 1);
                    }
                }

                if (!connection_string.to_lower().Contains(connect_options.to_lower()))
                {
                    connect_options = string.Empty;
                    foreach (string part in parts)
                    {
                        if (!part.to_lower().Contains("server") && !part.to_lower().Contains("data source") && !part.to_lower().Contains("initial catalog") &&
                            !part.to_lower().Contains("database"))
                        {
                            connect_options += part + ";";
                        }
                    }
                }
            }


            if (connect_options == "Integrated Security")
            {
                connect_options = "Integrated Security=SSPI;";
            }

            if (string.IsNullOrEmpty(connection_string))
            {
                connection_string = build_connection_string(server_name, database_name, connect_options);
            }

            configuration_property_holder.ConnectionString = connection_string;

            set_provider();
            if (string.IsNullOrEmpty(admin_connection_string))
            {
                admin_connection_string = Regex.Replace(connection_string, "initial catalog=.*?;", "initial catalog=master;", RegexOptions.IgnoreCase);
                admin_connection_string = Regex.Replace(admin_connection_string, "database=.*?;", "database=master;", RegexOptions.IgnoreCase);
            }
            configuration_property_holder.ConnectionStringAdmin = admin_connection_string;

            //set_repository(configuration_property_holder);
        }
开发者ID:Smartrak,项目名称:roundhouse,代码行数:55,代码来源:SqlServerDatabase.cs


示例15: run_migrator

        public static void run_migrator(ConfigurationPropertyHolder configuration)
        {
            RoundhouseMigrationRunner migration_runner = get_migration_runner(configuration);
            migration_runner.run();

            if (!configuration.Silent)
            {
                Console.WriteLine("{0}Please press enter to continue...", Environment.NewLine);
                Console.Read();
            }
        }
开发者ID:AndersMalmgren,项目名称:roundhouse,代码行数:11,代码来源:Program.cs


示例16: run_initial_database_setup

        // initial database setup
        private void run_initial_database_setup(Migrate migrator, ConfigurationPropertyHolder configuration, Assembly mappings_assembly, Assembly conventions_assembly)
        {
            var files_directory = configuration.SqlFilesDirectory;
            configuration.SqlFilesDirectory = ".";

            migrator.Run();

            generate_database_schema(configuration.DatabaseName, mappings_assembly, conventions_assembly);

            configuration.SqlFilesDirectory = files_directory;
            migrator.RunDropCreate();
        }
开发者ID:GunioRobot,项目名称:roundhouse,代码行数:13,代码来源:DifferenceWithFluentNHibernate.cs


示例17: DefaultDatabaseMigrator

 public DefaultDatabaseMigrator(Database database, CryptographicService crypto_provider, ConfigurationPropertyHolder configuration)
 {
     this.database = database;
     this.crypto_provider = crypto_provider;
     this.configuration = configuration;
     restoring_database = configuration.Restore;
     restore_path = configuration.RestoreFromPath;
     custom_restore_options = configuration.RestoreCustomOptions;
     output_path = configuration.OutputPath;
     error_on_one_time_script_changes = !configuration.WarnOnOneTimeScriptChanges;
     is_running_all_any_time_scripts = configuration.RunAllAnyTimeScripts;
 }
开发者ID:keithbloom,项目名称:roundhouse,代码行数:12,代码来源:DefaultDatabaseMigrator.cs


示例18: initialize_connections

        public override void initialize_connections(ConfigurationPropertyHolder configuration_property_holder)
        {
            if (!string.IsNullOrEmpty(connection_string))
            {
                string[] parts = connection_string.Split(';');
                foreach (string part in parts)
                {
                    if (string.IsNullOrEmpty(server_name) && part.to_lower().Contains("server"))
                    {
                        server_name = part.Substring(part.IndexOf("=") + 1);
                    }

                    if (string.IsNullOrEmpty(database_name) && part.to_lower().Contains("database"))
                    {
                        database_name = part.Substring(part.IndexOf("=") + 1);
                    }
                }

                if (!connection_string.to_lower().Contains(connect_options.to_lower()))
                {
                    connect_options = string.Empty;
                    foreach (string part in parts)
                    {
                        if (!part.to_lower().Contains("server") && !part.to_lower().Contains("data source") && !part.to_lower().Contains("initial catalog") &&
                            !part.to_lower().Contains("database"))
                        {
                            connect_options += part + ";";
                        }
                    }
                }
            }

            if (connect_options == "Trusted_Connection")
            {
                connect_options = "Trusted_Connection=yes;";
            }

            if (string.IsNullOrEmpty(connection_string))
            {
                connection_string = build_connection_string(server_name, database_name, connect_options);
            }

            if (connection_string.to_lower().Contains("sqlserver") || connection_string.to_lower().Contains("sqlncli"))
            {
                connection_string = build_connection_string(server_name, database_name, connect_options);
            }
            configuration_property_holder.ConnectionString = connection_string;

            set_provider();
            admin_connection_string = connection_string;
            configuration_property_holder.ConnectionStringAdmin = admin_connection_string;
            //set_repository(configuration_property_holder);
        }
开发者ID:k4gdw,项目名称:roundhouse,代码行数:53,代码来源:AccessDatabase.cs


示例19: build

        public static Database build(FileSystemAccess file_system, ConfigurationPropertyHolder configuration_property_holder)
        {
            Database database_to_migrate;

            if (Assembly.GetExecutingAssembly().Location.Contains("roundhouse.dll"))
            {
                merge_assembly_name = "roundhouse";
            }

            try
            {
                string database_type = configuration_property_holder.DatabaseType;
                database_type = database_type.Substring(0, database_type.IndexOf(','));
                database_to_migrate = DefaultInstanceCreator.create_object_from_string_type<Database>(database_type + ", " + merge_assembly_name);

            }
            catch (NullReferenceException)
            {
                database_to_migrate = DefaultInstanceCreator.create_object_from_string_type<Database>(configuration_property_holder.DatabaseType);
            }

            if (restore_from_file_ends_with_LiteSpeed_extension(file_system, configuration_property_holder.RestoreFromPath))
            {
                database_to_migrate = new SqlServerLiteSpeedDatabase(database_to_migrate);
            }

            if (configuration_property_holder.Baseline)
            {
                database_to_migrate = new BaselineModeDatabase(database_to_migrate);
            }

            if (configuration_property_holder.DryRun)
            {
                database_to_migrate = new DryRunDatabase(database_to_migrate);
            }

            database_to_migrate.configuration = configuration_property_holder;
            database_to_migrate.server_name = configuration_property_holder.ServerName ?? string.Empty;
            database_to_migrate.database_name = configuration_property_holder.DatabaseName ?? string.Empty;
            database_to_migrate.connection_string = configuration_property_holder.ConnectionString;
            database_to_migrate.admin_connection_string = configuration_property_holder.ConnectionStringAdmin;
            database_to_migrate.roundhouse_schema_name = configuration_property_holder.SchemaName;
            database_to_migrate.version_table_name = configuration_property_holder.VersionTableName;
            database_to_migrate.scripts_run_table_name = configuration_property_holder.ScriptsRunTableName;
            database_to_migrate.scripts_run_errors_table_name = configuration_property_holder.ScriptsRunErrorsTableName;
            database_to_migrate.user_name = get_identity_of_person_running_roundhouse();
            database_to_migrate.command_timeout = configuration_property_holder.CommandTimeout;
            database_to_migrate.admin_command_timeout = configuration_property_holder.CommandTimeoutAdmin;
            database_to_migrate.restore_timeout = configuration_property_holder.RestoreTimeout;

            return database_to_migrate;
        }
开发者ID:kolupaev,项目名称:roundhouse,代码行数:52,代码来源:DatabaseBuilder.cs


示例20: get_user

        public static string get_user(string default_user_name, ConfigurationPropertyHolder configuration_property_holder)
        {
            var user_name = string.Empty;
            if (in_interactive_mode(configuration_property_holder))
            {
                Console.WriteLine("Please enter a user name and press enter (leave empty for '{0}')", default_user_name);
                user_name = Console.ReadLine();
            }
            user_name = !string.IsNullOrEmpty(user_name) ? user_name : default_user_name;
            Log.bound_to(typeof(InteractivePrompt)).log_an_info_event_containing("Using '{0}' for the user name.", user_name);

            return user_name;
        }
开发者ID:Smartrak,项目名称:roundhouse,代码行数:13,代码来源:InteractivePrompt.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ConfigurationSaveMode类代码示例发布时间:2022-05-24
下一篇:
C# ConfigurationManager类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap