⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dtspackagecontent.cs

📁 SQL Server 2005 Integration Services (SSIS) is a new Extract, Transform, and Load (ETL) tool that sh
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Pipeline;
using dtr = Microsoft.SqlServer.Dts.Runtime.Wrapper;


namespace Crowe.ExploreIS
{
    public enum DTSPackageContentType
    {
        Executable,
        Connection
    }

    class DTSPackageContent
    {
        private Executable _exec;

        List<DTSPackageContentItem> _DTSContentItemList;
        DTSPackageContentType _myType;

        //This will contail multiple constructors
        //for each type of content

        public DTSPackageContent(Executable exec)
        {
            _exec = exec;

            _DTSContentItemList = new List<DTSPackageContentItem>();

            _myType = DTSPackageContentType.Executable;
        }

        public void LoadContentItems()
        {
            switch (_myType)
            {
                case DTSPackageContentType.Executable:
                    LoadExecutableContents();
                    break;
                case DTSPackageContentType.Connection:
                    break;
            }
        }

        public List<DTSPackageContentItem> ContentItems
        {
            get
            {
                return (_DTSContentItemList);
            }
        }

        private void LoadExecutableContents()
        {
            DTSPackageContentItem itm;
            TaskHost th;
            Task tsk;
            MainPipe mp;

            itm = new DTSPackageContentItem(_exec.GetType().ToString() + "---" + _exec.ToString());

            _DTSContentItemList.Add(itm);

            if (_exec is TaskHost)
            {
                th = _exec as TaskHost;

                if (th.InnerObject is MainPipe)
                {
                    mp = th.InnerObject as MainPipe;

                    foreach (IDTSComponentMetaData90 md in mp.ComponentMetaDataCollection)
                    {
                        itm = new DTSPackageContentItem(md.Description);
                        _DTSContentItemList.Add(itm);

                    }
                }
            }
        }

        public bool IsContainedContent()
        {
            return (false);
        }

        public bool IsMoreItems()
        {
            return  (false);
        }

        public DTSPackageContentItem ReadNextItem()
        {
            DTSPackageContentItem itm;

            itm = null;

            return (itm);
        }

        public DTSPackageContent ReadNextContent()
        {
            DTSPackageContent cnt;

            cnt = null;

            return (cnt);
        }

        public string ContentName
        {
            get
            {
                return ("");
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -