예제 #1
0
        public static Pattern ProcessPattern(Packages.VulcanPackage vulcanPackage, DTS.IDTSSequence parentContainer, XPathNavigator patternNavigator, Pattern previousPattern)
        {
            DTS.Executable lastExecutableInPattern = null;
            if (previousPattern != null)
            {
                lastExecutableInPattern = previousPattern.FirstExecutableGeneratedByPattern;
            }
            Pattern p = null;
            Message.Trace(Severity.Debug,"Emitting Pattern {0}", patternNavigator.Name);

            try
            {
                switch (patternNavigator.Name)
                {
                    case "HelperTables":
                        p = new HelperTablePattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "ETL":
                        p = new ETLPattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "StoredProc":
                        p = new StoredProcPattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "Dimensions":
                        p = new DimensionsPattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "Logtainer":
                        p = new LogtainerPattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "LogUpdate":
                        p = new LogUpdatePattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "Container":
                        p = new ContainerPattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "FileSystemTask":
                        p = new FileSystemTaskPattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "ExecuteSQL":
                        p = new ExecuteSQLPattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "FactTable":
                        p = new FactTablePattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "ExecutePackage":
                        p = new ExecutePackagePattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    case "FTPTask":
                        p = new FTPTaskPattern(vulcanPackage, parentContainer);
                        p.Emit(patternNavigator);
                        break;
                    default:
                        break;
                }
            }
            catch (System.Runtime.InteropServices.COMException ce)
            {
                Message.Trace(Severity.Error,ce,"Exception in Pattern {0}\n {1}\n", patternNavigator.Name, ce.Message);
            }
            catch (Exception e)
            {
                Message.Trace(Severity.Error,e,"Exception in Pattern {0}\n {1}\n", patternNavigator.Name, e.Message);
            }

            return p;
        }
예제 #2
0
        public static Pattern ProcessPattern(Packages.VulcanPackage vulcanPackage, DTS.IDTSSequence parentContainer, XPathNavigator patternNavigator, Pattern previousPattern)
        {
            DTS.Executable lastExecutableInPattern = null;
            if (previousPattern != null)
            {
                lastExecutableInPattern = previousPattern.FirstExecutableGeneratedByPattern;
            }
            Pattern p = null;

            Message.Trace(Severity.Debug, "Emitting Pattern {0}", patternNavigator.Name);

            try
            {
                switch (patternNavigator.Name)
                {
                case "HelperTables":
                    p = new HelperTablePattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "ETL":
                    p = new ETLPattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "StoredProc":
                    p = new StoredProcPattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "Dimensions":
                    p = new DimensionsPattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "Logtainer":
                    p = new LogtainerPattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "LogUpdate":
                    p = new LogUpdatePattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "Container":
                    p = new ContainerPattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "FileSystemTask":
                    p = new FileSystemTaskPattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "ExecuteSQL":
                    p = new ExecuteSQLPattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "FactTable":
                    p = new FactTablePattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "ExecutePackage":
                    p = new ExecutePackagePattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                case "FTPTask":
                    p = new FTPTaskPattern(vulcanPackage, parentContainer);
                    p.Emit(patternNavigator);
                    break;

                default:
                    break;
                }
            }
            catch (System.Runtime.InteropServices.COMException ce)
            {
                Message.Trace(Severity.Error, ce, "Exception in Pattern {0}\n {1}\n", patternNavigator.Name, ce.Message);
            }
            catch (Exception e)
            {
                Message.Trace(Severity.Error, e, "Exception in Pattern {0}\n {1}\n", patternNavigator.Name, e.Message);
            }

            return(p);
        }