public VulcanEngine.IR.IIR Execute(VulcanEngine.IR.IIR PredecessorIR)
        {
            PhysicalIR physicalIR = PredecessorIR as PhysicalIR;

            if (physicalIR == null)
            {
                // TODO: Message.Trace(Severity.Error, Resources.ErrorPhaseWorkflowIncorrectInputIRType, PredecessorIR.GetType().ToString(), this.Name);
            }

            foreach (LogicalObject physicalNode in physicalIR.PhysicalNodes)
            {
                if (physicalNode is ConnectionConfiguration)
                {
                    SsisConnectionConfiguration configEmitter = new SsisConnectionConfiguration((ConnectionConfiguration)physicalNode, new SSISEmitterContext(null, null, _pluginLoader));
                    configEmitter.Emit();
                }
            }

            int PackagesCount     = physicalIR.PhysicalNodes.Count(delegate(LogicalObject o) { return(o is Package); });
            int PackagesProcessed = 0;

            foreach (LogicalObject physicalNode in physicalIR.PhysicalNodes)
            {
                if (physicalNode is Package)
                {
                    SsisPackage emitterPackage = new SsisPackage((Package)physicalNode, new SSISEmitterContext(null, null, _pluginLoader));
                    MessageEngine.Global.UpdateProgress(PackagesProcessed / (double)PackagesCount);
                    emitterPackage.Emit();
                    MessageEngine.Global.UpdateProgress(++PackagesProcessed / (double)PackagesCount);
                }
            }
            return(null);
        }
Exemple #2
0
 internal SSISEmitterContext(SsisPackage package, SsisSequence parentSequence, PluginLoader <ISSISEmitter, PhysicalIRMappingAttribute> pluginLoader)
 {
     _package      = package;
     _ssisSequence = parentSequence;
     _guid         = Guid.NewGuid();
     _message      = MessageEngine.Create(String.Format(System.Globalization.CultureInfo.InvariantCulture, "SSISFactory: {0}", _guid.ToString()));
     if (_ssisSequence != null)
     {
         _parentContainer = _ssisSequence.DTSSequence;
     }
     _pluginLoader = pluginLoader;
 }
Exemple #3
0
 internal SSISEmitterContext(SsisPackage package, SsisSequence parentSequence, PluginLoader <ISSISEmitter, PhysicalIRMappingAttribute> pluginLoader, SsisPipelineTask ssisDataFlowTask)
     : this(package, parentSequence, pluginLoader)
 {
     this._ssisDataFlowTask = ssisDataFlowTask;
 }