public SqlMakerFurther(
            BptConnection bptConnection = null,
            Connection connection       = null,
            TypeUpdate typeUpdate       = TypeUpdate.Increment,
            BptProject bptProject       = null)
        {
            if (bptConnection != null)
            {
                this.bptConnection = bptConnection;
            }
            else
            {
                throw new ArgumentNullException("bptConnection", "O parâmetro 'bptConnection' não pode ser null");
            }

            if (connection != null)
            {
                this.Connection = connection;
            }
            else
            {
                throw new ArgumentNullException("connection", "O parâmetro 'connection' não pode ser null");
            }

            if (bptProject != null)
            {
                this.BptProject = bptProject;
            }
            else
            {
                throw new ArgumentNullException("bptProject", "O parâmetro 'bptProject' não pode ser null");
            }
        }
Esempio n. 2
0
        public SqlMakerProjects(
            BptConnection bptConnection = null,
            Connection connection       = null,
            TypeUpdate typeUpdate       = TypeUpdate.Increment)
        {
            if (bptConnection != null)
            {
                this.bptConnection = bptConnection;
            }
            else
            {
                throw new ArgumentNullException("bptConnection", "O parâmetro 'bptConnection' não pode ser null");
            }

            if (connection != null)
            {
                this.Connection = connection;
            }
            else
            {
                throw new ArgumentNullException("connection", "O parâmetro 'connection' não pode ser null");
            }

            this.typeUpdate = typeUpdate;
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            var almConnection = new BptConnection(Ambientes.HOMOLOGACAO);
            var sgqConnection = new Connection();

            var sqlMakerProjects = new SqlMakerProjects(almConnection, sgqConnection, TypeUpdate.Increment);

            var bptProjects           = new BptProjects(sqlMakerProjects);
            var periodLoadOwnData     = bptProjects.loadOwnData();
            var periodDeleteAllData   = bptProjects.deleteAllData();
            var periodLoadFurtherData = bptProjects.loadFurtherData();

            Console.WriteLine("Tempo de carga");
            Console.WriteLine("==============================================");
            Console.WriteLine($"Carga de seus próprios dados        : {(int)periodLoadOwnData.End.Subtract(periodLoadOwnData.Start).Seconds} (s)");
            Console.WriteLine($"Exclusão de todos os dados          : {(int)periodDeleteAllData.End.Subtract(periodDeleteAllData.Start).Seconds} (s)");
            Console.WriteLine($"Carga de demais dados               : {(int)periodLoadFurtherData.End.Subtract(periodLoadFurtherData.Start).Seconds} (s)");
            Console.WriteLine("==============================================");

            Console.WriteLine("Fim");
            Console.ReadKey();
        }