SCS.StringDictionary GetEnvironmentVariables()
        {
            if (EnvironmentVariables == null || EnvironmentVariables.Length == 0)
            {
                return(EnvironmentOverride);
            }

            var env_vars = new SCS.ProcessStringDictionary();

            foreach (string pair in EnvironmentVariables)
            {
                string [] key_value = pair.Split('=');
                if (!String.IsNullOrEmpty(key_value [0]))
                {
                    env_vars [key_value [0]] = key_value.Length > 1 ? key_value [1] : String.Empty;
                }
            }

            if (EnvironmentOverride != null)
            {
                foreach (DictionaryEntry entry in EnvironmentOverride)
                {
                    env_vars [(string)entry.Key] = (string)entry.Value;
                }
            }

            return(env_vars);
        }
Ejemplo n.º 2
0
		protected ToolTask (ResourceManager taskResources,
				   string helpKeywordPrefix)
		{
			this.TaskResources = taskResources;
			this.HelpKeywordPrefix = helpKeywordPrefix;
			this.toolPath = MonoLocationHelper.GetBinDir ();
			this.responseFileEncoding = Encoding.UTF8;
			this.timeout = Int32.MaxValue;
			this.environmentOverride = new SCS.ProcessStringDictionary ();
		}
Ejemplo n.º 3
0
 protected ToolTask(ResourceManager taskResources,
                    string helpKeywordPrefix)
 {
     this.TaskResources        = taskResources;
     this.HelpKeywordPrefix    = helpKeywordPrefix;
     this.toolPath             = MonoLocationHelper.GetBinDir();
     this.responseFileEncoding = Encoding.UTF8;
     this.timeout             = Int32.MaxValue;
     this.environmentOverride = new SCS.ProcessStringDictionary();
 }
Ejemplo n.º 4
0
		SCS.StringDictionary GetEnvironmentVariables ()
		{
			if (EnvironmentVariables == null || EnvironmentVariables.Length == 0)
				return EnvironmentOverride;

			var env_vars = new SCS.ProcessStringDictionary ();
			foreach (string pair in EnvironmentVariables) {
				string [] key_value = pair.Split ('=');
				if (!String.IsNullOrEmpty (key_value [0]))
					env_vars [key_value [0]] = key_value.Length > 1 ? key_value [1] : String.Empty;
			}

			if (EnvironmentOverride != null)
				foreach (DictionaryEntry entry in EnvironmentOverride)
					env_vars [(string)entry.Key] = (string)entry.Value;

			return env_vars;
		}