예제 #1
0
 public ISInput(ISPipelineComponent parentComponent, int inputIndex = 0)
 {
     ParentComponent = parentComponent;
     if (ParentComponent.ComponentMetaData.InputCollection.Count > 0)
     {
         Input = ParentComponent.GetInputFromIndex(inputIndex);
     }
 }
예제 #2
0
        public ISInput(ISPipelineComponent parentComponent, string inputName)
        {
            ParentComponent = parentComponent;

            bool inputExists = false;

            for (int i = 0; i < ParentComponent.ComponentMetaData.InputCollection.Count; i++)
            {
                if (ParentComponent.ComponentMetaData.InputCollection[i].Name == inputName)
                {
                    inputExists = true;
                    Input       = ParentComponent.ComponentMetaData.InputCollection[i];
                }
            }
            if (!(inputExists))
            {
                //Input = ParentComponent.AddInput("after", ParentComponent.GetInputFromIndex(0).Name);
                Input      = ParentComponent.DesignTimeComponent.InsertInput(DtsUtility.EnumAToEnumB <InsertPlacement, DTSInsertPlacement>(InsertPlacement.IP_AFTER), ParentComponent.GetInputFromIndex(ParentComponent.InputCollection_m.Count - 1).ID);
                Input.Name = inputName;
            }
        }