コード例 #1
0
        protected override void Execute(CodeActivityContext context)
        {
            string configPath = ConfigurationPath.Get(context);

            if (File.Exists(configPath))
            {
                string  config_text    = File.ReadAllText(configPath);
                JObject config_jobject = JObject.Parse(config_text);
                Configuration.Set(context, config_jobject);
                // We purposefully didn't put this in a try-catch
                // block so the user can handle issues in their process
            }
            throw new FileNotFoundException(string.Format("Configuration file \"{0}\" was not found", configPath));
        }