public MonitoramentoPerformance(string operation, string local, IProcedureInvoker procedureInvoker, ILog logger) { this.procedureInvoker = procedureInvoker; this.logger = logger; this.operation = operation; this.local = local; var monitor = BSSISMONITOR.Executar(procedureInvoker, logger, "I", operation, local, handleSisMonitor); handleSisMonitor = monitor.Sequencia ?? 0; }
public static BSSISMONITOR Executar(IProcedureInvoker procedureInvoker, ILog logger, string Operacao, string Local, string ProcPai, long?Sequencia) { List <OracleParameter> parameters = new List <OracleParameter>(); parameters.Clear(); parameters.Add(procedureInvoker.AdicionarParametro("pOperacao", Operacao, ParameterDirection.Input, OracleDbType.Varchar2, 1)); parameters.Add(procedureInvoker.AdicionarParametro("pLocal", Local, ParameterDirection.Input, OracleDbType.Varchar2, 250)); parameters.Add(procedureInvoker.AdicionarParametro("pProcPai", ProcPai, ParameterDirection.Input, OracleDbType.Varchar2, 250)); parameters.Add(procedureInvoker.AdicionarParametro("pSequencia", Sequencia, ParameterDirection.InputOutput, OracleDbType.Int64)); bool logDebug = logger.IsDebugEnabled; if (logDebug) { logger.DebugFormat("Chamada da procedure: BSSIS_MONITOR."); if (parameters.Count() > 0) { logger.DebugFormat("Parâmetros: "); parameters.ForEach(p => logger.DebugFormat(String.Format("{0}: {1}", p.ParameterName, p.Value))); } } procedureInvoker.ExecutaProcedure("BSSIS_MONITOR", ref parameters); if (logDebug) { logger.DebugFormat("Procedure executada."); parameters.Where(p => p.Direction != ParameterDirection.Input).ToList().ForEach(p => logger.DebugFormat(String.Format("Retorno - {0}: {1}", p.ParameterName, p.Value))); } var resultado = new BSSISMONITOR(); if (parameters.Find(x => x.ParameterName == "pSequencia").Status == OracleParameterStatus.Success) { resultado.Sequencia = ((OracleDecimal)parameters.Find(x => x.ParameterName == "pSequencia").Value).ToInt64(); } else { resultado.Sequencia = null; } return(resultado); }
public static IMonitoramentoProcesso InicializarNovoMonitoramento( IProcedureInvoker procedureInvoker, long handleUsuario, string descricaoProcesso, string mensagem, int progressoMaximo, long?handleRegistroRotina, string nomeTabelaRotina, bool pegarOcorrenciasNaTabelaInformada = true) { return(NovoMonitoramentoProgressoManual(handleUsuario, descricaoProcesso, mensagem, progressoMaximo, handleRegistroRotina, nomeTabelaRotina, pegarOcorrenciasNaTabelaInformada)); }
public static IMonitoramentoProcesso CarregarMonitoramentoExistente(IProcedureInvoker ProcedureInvoker, long HandleUsuario, long idProcesso, IRepositorio <RegistroProcesso> repositorioRegistroProcesso, bool pegarOcorrenciasNaTabelaInformada = true) { return(CarregarMonitoramentoExistente(HandleUsuario, idProcesso, pegarOcorrenciasNaTabelaInformada)); }