示例#1
0
        private int _creationOrder; //used for keeping 'natural' (creation order) to later use it when applying scripts

        #endregion Fields

        #region Constructors

        public DbUpgradeScript(DbScriptType scriptType, string sql, DbObjectChange modelChange = null, ApplyPhase phase = ApplyPhase.Default)
        {
            ScriptType = scriptType;
              Sql = sql;
              ModelChange = modelChange;
              Phase = phase;
              _creationOrder = System.Threading.Interlocked.Increment(ref _creationCount);
        }
示例#2
0
 public DbUpgradeScript(DbScriptType scriptType, string sql, DbObjectChange modelChange = null, ApplyPhase phase = ApplyPhase.Default)
 {
     ScriptType     = scriptType;
     Sql            = sql;
     ModelChange    = modelChange;
     Phase          = phase;
     _creationOrder = System.Threading.Interlocked.Increment(ref _creationCount);
 }
示例#3
0
 public DbUpgradeScript AddScript(DbScriptType scriptType, ApplyPhase phase, string sqlTemplate, params object[] args)
 {
     string sql = sqlTemplate;
       if(args != null && args.Length > 0)
     sql = string.Format(sqlTemplate, args);
       var script = new DbUpgradeScript(scriptType, sql, this, phase);
       Scripts.Add(script);
       return script;
 }
示例#4
0
        public DbUpgradeScript AddScript(DbScriptType scriptType, ApplyPhase phase, string sqlTemplate, params object[] args)
        {
            Util.CheckNotEmpty(sqlTemplate, "Fatal error: attempt to add empty upgrade SQL scrpt; scriptType: {0}", scriptType);
            string sql = sqlTemplate;

            if (args != null && args.Length > 0)
            {
                sql = string.Format(sqlTemplate, args);
            }
            var script = new DbUpgradeScript(scriptType, sql, this, phase);

            Scripts.Add(script);
            return(script);
        }
示例#5
0
 public AttackInputInfo(List <PlayerKeyCode> key_codes, CommandType command_type, ApplyPhase apply_phase)
 {
     keyCodes    = key_codes;
     commandType = command_type;
     applyPhase  = apply_phase;
 }