Fusion.Build.Builder.Download C# (CSharp) Method

Download() private method

private Download ( BuildContext context, KeyDataCollection section, BuildResult result ) : void
context BuildContext
section KeyDataCollection
result BuildResult
return void
		void Download ( BuildContext context, KeyDataCollection section, BuildResult result )
		{
			Log.Message("Downloading...");

			foreach ( var keyValue in section ) {

				if (Path.IsPathRooted(keyValue.KeyName)) {
					throw new BuildException(string.Format("Rooted paths are not allowed: {0}", keyValue.KeyName));
				}
				
				var fullPath	=	Path.Combine( context.Options.FullInputDirectory, keyValue.KeyName );
				var urlName		=	keyValue.Value;

				Log.Message("  {0} -> {1}", urlName, keyValue.KeyName);

				try {
					
					DownloadIfModified( urlName, fullPath);
					 
				} catch ( WebException wex ) {
					Log.Error("{0} : {1}", keyValue.KeyName, wex.Message );
					result.Failed++;
				}
			}
		}