Exemplo n.º 1
0
        private bool a(PackageClass A_0, CapaDatos.DTSGlobalVariables[] A_1)
        {
            bool flag = false;

            try
            {
                IEnumerator enumerator1;
                try
                {
                    enumerator1 = A_0.get_GlobalVariables().GetEnumerator();
                    while (enumerator1.MoveNext())
                    {
                        GlobalVariable current = (GlobalVariable)enumerator1.Current;
                        int            num     = checked (A_1.GetLength(0) - 1);
                        int            index   = 0;
                        while (index <= num)
                        {
                            if (Microsoft.VisualBasic.CompilerServices.Operators.CompareString(current.get_Name(), A_1[index].Name, false) == 0)
                            {
                                A_0.get_GlobalVariables().Remove((object)current.get_Name());
                            }
                            checked { ++index; }
                        }
                    }
                }
                finally
                {
                    if (enumerator1 is IDisposable)
                    {
                        (enumerator1 as IDisposable).Dispose();
                    }
                }
                int num1   = checked (A_1.GetLength(0) - 1);
                int index1 = 0;
                while (index1 <= num1)
                {
                    this.CreateConnection();
                    if (Microsoft.VisualBasic.CompilerServices.Operators.CompareString(A_1[index1].Name, "DataSource", false) == 0)
                    {
                        A_0.get_GlobalVariables().AddGlobalVariable(A_1[index1].Name, (object)this.b());
                    }
                    else if (Microsoft.VisualBasic.CompilerServices.Operators.CompareString(A_1[index1].Name, "Catalog", false) == 0)
                    {
                        A_0.get_GlobalVariables().AddGlobalVariable(A_1[index1].Name, (object)this.a());
                    }
                    else
                    {
                        A_0.get_GlobalVariables().AddGlobalVariable(A_1[index1].Name, (object)A_1[index1].Value);
                    }
                    this.CloseConnection();
                    checked { ++index1; }
                }
                A_0.Execute();
                IEnumerator enumerator2;
                try
                {
                    enumerator2 = A_0.get_Steps().GetEnumerator();
                    while (enumerator2.MoveNext())
                    {
                        if (((Step)enumerator2.Current).get_ExecutionResult() == 1)
                        {
                            flag = true;
                        }
                    }
                }
                finally
                {
                    if (enumerator2 is IDisposable)
                    {
                        (enumerator2 as IDisposable).Dispose();
                    }
                }
            }
            catch (Exception ex)
            {
                ProjectData.SetProjectError(ex);
                Exception exception = ex;
                flag = true;
                throw exception;
            }
            finally
            {
                A_0.UnInitialize();
            }
            return(!flag);
        }