/// <summary>Gets the task associated with the host.</summary>
        /// <typeparam name="T">The type of the task.</typeparam>
        /// <param name="source">The source.</param>
        /// <returns>The task.</returns>
        /// <exception cref="Exception">No task associated with the host.</exception>
        public static T GetTask <T> (this TaskHost source) where T : Task
        {
            T task;

            if (!source.TryGetTask <T>(out task))
            {
                throw new Exception("Task not found in host.");
            }

            return(task);
        }
        public OutputViewNode(TaskHost host)
        {
            m_host = host;

            //Properties
            GenerateSsrsTask task;

            if (host.TryGetTask(out task))
            {
                Content = task.Content;
            }
            ;
        }
        public GeneralViewNode(TaskHost host, IDtsConnectionService connectionService)
        {
            ConnectionService = connectionService;

            //General properties
            m_name        = host.Name;
            m_description = host.Description;

            //Connection properties
            GenerateSsrsTask task;

            if (host.TryGetTask(out task))
            {
                HttpConnection = task.ServerConnection;
                m_format       = task.ReportFormat;
                m_path         = task.ReportPath;
            }
            ;
        }