コード例 #1
0
		private void CheckCodeGenParameters(InputParameterCollection parameters,
		                                    CodeGen.PackageLib.InputParameterCollection packageParameters) {
			if (packageParameters == null) {
				return;
			}
			foreach (CodeGen.PackageLib.InputParameter packageParameter in packageParameters) {
				if (!parameters.Contains(packageParameter.Name)) {
					if (!packageParameter.IsRequired) {
						parameters.Add(packageParameter.Name, packageParameter.Value);
					}
					else {
						throw new ApplicationException(String.Format("Parameter {0} was not specified.", packageParameter.Name));
					}
				}
			}
		}
コード例 #2
0
		private void AddProjectParameters(InputParameterCollection parameters) {
			if (Project != null) {
				foreach (InputParameter parameter in Project.InputParameters) {
					if (!parameters.Contains(parameter.Name)) {
						parameters.Add(parameter.Name, parameter.Value);
					}
				}
			}
		}