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


C# IMigrationProcessor类代码示例

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


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

示例1: TransactionalMigrationScope

 public TransactionalMigrationScope(IMigrationProcessor migrationProcessor, Action disposalAction)
     : base(disposalAction)
 {
     if (migrationProcessor == null) throw new ArgumentNullException("migrationProcessor");
     _migrationProcessor = migrationProcessor;
     _migrationProcessor.BeginTransaction();
 }
开发者ID:BarsBarsovich,项目名称:fluentmigrator,代码行数:7,代码来源:IMigrationScope.cs

示例2: MigrationRunner

        public MigrationRunner(IAssemblyCollection assemblies, IRunnerContext runnerContext, IMigrationProcessor processor)
        {
            _migrationAssemblies = assemblies;
            _announcer = runnerContext.Announcer;
            Processor = processor;
            _stopWatch = runnerContext.StopWatch;
            RunnerContext = runnerContext;

            SilentlyFail = false;
            CaughtExceptions = null;

            Conventions = new MigrationConventions();
            if (!string.IsNullOrEmpty(runnerContext.WorkingDirectory))
                Conventions.GetWorkingDirectory = () => runnerContext.WorkingDirectory;

            _migrationScopeHandler = new MigrationScopeHandler(Processor);
            _migrationValidator = new MigrationValidator(_announcer, Conventions);
            MigrationLoader = new DefaultMigrationInformationLoader(Conventions, _migrationAssemblies, runnerContext.Namespace, runnerContext.NestedNamespaces, runnerContext.Tags);
            ProfileLoader = new ProfileLoader(runnerContext, this, Conventions);
            MaintenanceLoader = new MaintenanceLoader(_migrationAssemblies, runnerContext.Tags, Conventions);

            if (runnerContext.NoConnection){
                VersionLoader = new ConnectionlessVersionLoader(this, _migrationAssemblies, Conventions, runnerContext.StartVersion, runnerContext.Version);
            }
            else{
                VersionLoader = new VersionLoader(this, _migrationAssemblies, Conventions);
            }
        }
开发者ID:eloekset,项目名称:fluentmigrator,代码行数:28,代码来源:MigrationRunner.cs

示例3: MigrationRunner

 public MigrationRunner(Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor)
     : this(new List<MigrationAssemblyInfo>() { new MigrationAssemblyInfo() { Assembly = assembly , Namespace = runnerContext.Namespace} }, 
         runnerContext, 
         processor,
         false)
 {
 }
开发者ID:MikeBagos,项目名称:fluentmigrator,代码行数:7,代码来源:MigrationRunner.cs

示例4: ExecuteWith

 public override void ExecuteWith(IMigrationProcessor processor)
 {
     // since all the Processors are using String.Format() in their Execute method
     //  we need to escape the brackets with double brackets or else it throws an incorrect format error on the String.Format call
     var sqlText = SqlStatement.Replace("{", "{{").Replace("}", "}}");
     processor.Execute(sqlText);
 }
开发者ID:BarsBarsovich,项目名称:fluentmigrator,代码行数:7,代码来源:ExecuteSqlStatementExpression.cs

示例5: ExecuteWith

        public override void ExecuteWith( IMigrationProcessor processor )
        {
            string sqlText;
            using (var reader = File.OpenText(SqlScript))
                sqlText = reader.ReadToEnd();

            processor.Execute(sqlText);
        }
开发者ID:rtw,项目名称:fluentmigrator,代码行数:8,代码来源:ExecuteSqlScriptExpression.cs

示例6: MigrationContext

 public MigrationContext(IMigrationConventions conventions, IMigrationProcessor migrationProcessor, Assembly migrationAssembly)
 {
     Conventions = conventions;
     Expressions = new List<IMigrationExpression>();
     QuerySchema = migrationProcessor;
     PreviewOnly = migrationProcessor.Options.PreviewOnly;
     MigrationAssembly = migrationAssembly;
 }
开发者ID:mgaspar,项目名称:fluentmigrator,代码行数:8,代码来源:MigrationContext.cs

示例7: MigrationRunner

 public MigrationRunner(IMigrationConventions conventions, IMigrationProcessor processor, IAnnouncer announcer, IStopWatch stopWatch)
 {
     _announcer = announcer;
     SilentlyFail = false;
     CaughtExceptions = null;
     Conventions = conventions;
     Processor = processor;
     _stopWatch = stopWatch;
 }
开发者ID:ngbrown,项目名称:fluentmigrator,代码行数:9,代码来源:MigrationRunner.cs

示例8: MigrationVersionRunner

 public MigrationVersionRunner(IMigrationConventions conventions, IMigrationProcessor processor, IMigrationLoader loader, Assembly assembly, string @namespace)
 {
     _migrationConventions = conventions;
     _migrationProcessor = processor;
     _migrationAssembly = assembly;
     _migrationLoader = loader;
     _namespace = @namespace;
     _migrationRunner = new MigrationRunner(conventions, processor);
        _versionMigration = new VersionMigration();
 }
开发者ID:developingchris,项目名称:fluentmigrator,代码行数:10,代码来源:MigrationVersionRunner.cs

示例9: ExecuteWith

        public override void ExecuteWith( IMigrationProcessor processor )
        {
            string sqlText;
            using (var reader = File.OpenText(SqlScript))
                sqlText = reader.ReadToEnd();

            // since all the Processors are using String.Format() in their Execute method
            //  we need to escape the brackets with double brackets or else it throws an incorrect format error on the String.Format call
            sqlText = sqlText.Replace("{", "{{").Replace("}", "}}");
            processor.Execute(sqlText);
        }
开发者ID:remids,项目名称:fluentmigrator,代码行数:11,代码来源:ExecuteSqlScriptExpression.cs

示例10: MigrationVersionRunner

 public MigrationVersionRunner(IMigrationConventions conventions, IMigrationProcessor processor, IMigrationLoader loader, Assembly assembly, string @namespace, IAnnouncer announcer)
 {
     _migrationConventions = conventions;
     _migrationProcessor = processor;
     _migrationAssembly = assembly;
     _migrationLoader = loader;
     _namespace = @namespace;
     _announcer = announcer;
     _migrationRunner = new MigrationRunner(conventions, processor, announcer, new StopWatch());
     _versionTableMetaData = loader.GetVersionTableMetaData(assembly);
     _versionMigration = new VersionMigration(_versionTableMetaData);
 }
开发者ID:Andrea,项目名称:fluentmigrator,代码行数:12,代码来源:MigrationVersionRunner.cs

示例11: ExecuteWith

        public override void ExecuteWith(IMigrationProcessor processor)
        {
            string sqlText;
            string embeddedResourceName = GetQualifiedResourcePath();

            using (var stream = MigrationAssembly.GetManifestResourceStream(embeddedResourceName))
            using (var reader = new StreamReader(stream))
            {
                sqlText = reader.ReadToEnd();
            }

            // since all the Processors are using String.Format() in their Execute method
            //  we need to escape the brackets with double brackets or else it throws an incorrect format error on the String.Format call
            sqlText = sqlText.Replace("{", "{{").Replace("}", "}}");
            processor.Execute(sqlText);
        }
开发者ID:remids,项目名称:fluentmigrator,代码行数:16,代码来源:ExecuteEmbeddedSqlScriptExpression.cs

示例12: MigrationRunner

        public MigrationRunner(Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor)
        {
            _migrationAssembly = assembly;
            _announcer = runnerContext.Announcer;
            Processor = processor;
            _stopWatch = runnerContext.StopWatch;

            SilentlyFail = false;
            CaughtExceptions = null;

            Conventions = new MigrationConventions();
            if (!string.IsNullOrEmpty(runnerContext.WorkingDirectory))
                Conventions.GetWorkingDirectory = () => runnerContext.WorkingDirectory;

            VersionLoader = new VersionLoader(this, _migrationAssembly, Conventions);
            MigrationLoader = new MigrationLoader(Conventions, _migrationAssembly, runnerContext.Namespace);
            ProfileLoader = new ProfileLoader(runnerContext, this, Conventions);
        }
开发者ID:briandonahue,项目名称:fluentmigrator,代码行数:18,代码来源:MigrationRunner.cs

示例13: ExecuteWith

        public override void ExecuteWith(IMigrationProcessor processor)
        {
            string sqlText;
            string embeddedResourceName = GetQualifiedResourcePath(SqlScript);

            if (string.IsNullOrEmpty(embeddedResourceName))
            {
                throw new ArgumentNullException(string.Format("Could find resource named {0} in assembly {1}",SqlScript,MigrationAssembly.FullName));
            }

            using (var stream = MigrationAssembly.GetManifestResourceStream(embeddedResourceName))
            {
                using (var reader = new StreamReader(stream))
                {
                    sqlText = reader.ReadToEnd();
                }
            }

            processor.Execute(sqlText);
        }
开发者ID:timscott,项目名称:fluentmigrator,代码行数:20,代码来源:ExecuteEmbeddedSqlScriptExpression.cs

示例14: MigrationRunner

        public MigrationRunner(Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor)
        {
            _migrationAssembly = assembly;
            _announcer = runnerContext.Announcer;
            Processor = processor;
            _stopWatch = runnerContext.StopWatch;

            SilentlyFail = false;
            CaughtExceptions = null;

            Conventions = new MigrationConventions();

            ProcessWorkingDirectory(runnerContext);

            ProcessAutoReverse(runnerContext);

            VersionLoader = new VersionLoader(this, _migrationAssembly, Conventions);
            MigrationLoader = new MigrationLoader(Conventions, _migrationAssembly, runnerContext.Namespace);
            ProfileLoader = new ProfileLoader(runnerContext, this, Conventions);
        }
开发者ID:giovannifreda,项目名称:fluentmigrator,代码行数:20,代码来源:MigrationRunner.cs

示例15: MigrationRunner

        public MigrationRunner(Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor)
        {
            _migrationAssembly = assembly;
            _announcer = runnerContext.Announcer;
            Processor = processor;
            _stopWatch = runnerContext.StopWatch;
            ApplicationContext = runnerContext.ApplicationContext;
            TransactionPerSession = runnerContext.TransactionPerSession;

            SilentlyFail = false;
            CaughtExceptions = null;

            Conventions = new MigrationConventions();
            if (!string.IsNullOrEmpty(runnerContext.WorkingDirectory))
                Conventions.GetWorkingDirectory = () => runnerContext.WorkingDirectory;

            _migrationScopeHandler = new MigrationScopeHandler(Processor);
            _migrationValidator = new MigrationValidator(_announcer, Conventions);
            VersionLoader = new VersionLoader(this, _migrationAssembly, Conventions);
            MigrationLoader = new DefaultMigrationInformationLoader(Conventions, _migrationAssembly, runnerContext.Namespace, runnerContext.NestedNamespaces, runnerContext.Tags);
            ProfileLoader = new ProfileLoader(runnerContext, this, Conventions);
        }
开发者ID:BarsBarsovich,项目名称:fluentmigrator,代码行数:22,代码来源:MigrationRunner.cs


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