コード例 #1
0
        public SSISFlatFileSource(FlatFileSource filesrc, MainPipe pipe, ConnectionManager cm)
            : base(pipe, "Flat File Source")
        {
            IDTSComponentMetaData100 comp  = this.MetadataCollection;
            CManagedComponentWrapper dcomp = comp.Instantiate();

            // Set flatfile custom properties
            foreach (KeyValuePair <string, object> prop in filesrc.CustomProperties.CustomPropertyCollection.InnerArrayList)
            {
                dcomp.SetComponentProperty(prop.Key, prop.Value);
            }

            /*Specify the connection manager for Src.The Connections class is a collection of the connection managers that have been added to that package and are available for use at run time*/
            if (comp.RuntimeConnectionCollection.Count > 0)
            {
                comp.RuntimeConnectionCollection[0].ConnectionManagerID = cm.ID;
                comp.RuntimeConnectionCollection[0].ConnectionManager   = DtsConvert.GetExtendedInterface(cm);
            }

            this.Reinitialize(dcomp);
        }
コード例 #2
0
 public SSISFlatFileSource(FlatFileSource src, MainPipe pipe, ConnectionManager cm, ILogger logger, Application app)
     : base(pipe, "Flat File Source", logger, app)
 {
     _src = src;
     _cm  = cm;
 }