Esempio n. 1
0
        public HiLoSequence(ICommandRunner runner, string entityName, HiloDef def)
        {
            _runner = runner;
            _entityName = entityName;

            CurrentHi = -1;
            CurrentLo = 1;
            MaxLo = def.MaxLo;
            Increment = def.Increment;
        }
Esempio n. 2
0
        public ISequence HiLo(Type documentType, HiloDef def)
        {
            // TODO -- here, need to see if the mt_hilo table is created, and if not,
            // do it through _creation.

            if (!_schema.SchemaTableNames().Contains("mt_hilo"))
            {
                _creation.RunScript("mt_hilo");
            }

            return new HiLoSequence(_runner, documentType.Name, def);
        }