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); }
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); }
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; }
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); }
public AttackInputInfo(List <PlayerKeyCode> key_codes, CommandType command_type, ApplyPhase apply_phase) { keyCodes = key_codes; commandType = command_type; applyPhase = apply_phase; }