コード例 #1
0
        public static IDictionary<string, string> Execute(object job, string configuration, Action<string> logAction)
        {
            ActivityConfiguration activityConfiguration = Utils.GetActivityConfiguration(configuration);

            IDotNetActivity activityImplementation = job as IDotNetActivity;
            Ensure.IsNotNull(job, "job",
                string.Format(
                    CultureInfo.InvariantCulture,
                    "The type {0} in does not implement IDotNetActivity. Check the configuration and try again.",
                    job == null ? "<null>" : job.GetType().FullName));

            ActivityLogger logger = new ActivityLogger(logAction);

            Collection<LinkedService> linkedServices = new Collection<LinkedService>();
            Collection<Table> tables = new Collection<Table>();

            PopulateCollections(activityConfiguration.Inputs, linkedServices, tables);
            PopulateCollections(activityConfiguration.Outputs, linkedServices, tables);

            Activity activity = null;
            
            if(activityConfiguration.Pipeline != null &&
               activityConfiguration.Pipeline.Properties != null &&
               activityConfiguration.Pipeline.Properties.Activities != null)
            {
                activity = activityConfiguration.Pipeline.Properties.Activities.FirstOrDefault();
            }

            return activityImplementation.Execute(
                linkedServices,
                tables,
                activity,
                logger);
        }
コード例 #2
0
        public static IDictionary<string, string> Execute(object job, string configuration, Action<string> logAction)
        {
            ActivityConfiguration activityConfiguration = Utils.GetActivityConfiguration(configuration);

            IDotNetActivity activityImplementation = job as IDotNetActivity;
            Ensure.IsNotNull(job, "job",
                string.Format(
                    CultureInfo.InvariantCulture,
                    "The type {0} in does not implement IDotNetActivity. Check the configuration and try again.",
                    job == null ? "<null>" : job.GetType().FullName));

            ActivityLogger logger = new ActivityLogger(logAction);

            return activityImplementation.Execute(
                activityConfiguration.InputDataSets,
                activityConfiguration.OutputDataSets,
                activityConfiguration.ExtendedProperties,
                logger);
        }
コード例 #3
0
        public static IDictionary <string, string> Execute(object job, string configuration, Action <string> logAction)
        {
            ActivityConfiguration activityConfiguration = Utils.GetActivityConfiguration(configuration);

            IDotNetActivity activityImplementation = job as IDotNetActivity;

            Ensure.IsNotNull(job, "job",
                             string.Format(
                                 CultureInfo.InvariantCulture,
                                 "The type {0} in does not implement IDotNetActivity. Check the configuration and try again.",
                                 job == null ? "<null>" : job.GetType().FullName));

            ActivityLogger logger = new ActivityLogger(logAction);

            return(activityImplementation.Execute(
                       activityConfiguration.InputDataSets,
                       activityConfiguration.OutputDataSets,
                       activityConfiguration.ExtendedProperties,
                       logger));
        }