public override PackageBuilder[] CreateDefaultBuilders() { List <PackageBuilder> list = new List <PackageBuilder> (); foreach (DeployPlatformInfo plat in DeployService.GetDeployPlatformInfo()) { BinariesZipPackageBuilder pb = (BinariesZipPackageBuilder)Clone(); pb.Platform = plat.Id; string ext = DeployService.GetArchiveExtension(pb.TargetFile); string fn = TargetFile.Substring(0, TargetFile.Length - ext.Length); pb.TargetFile = fn + "-" + plat.Id.ToLower() + ext; list.Add(pb); } return(list.ToArray()); }
/// <summary> /// Check the source XML against the transformed candidate value. /// </summary> /// <param name="candidate">XElement to compare.</param> protected virtual void Check(XElement candidate) { if (string.IsNullOrEmpty(TargetFile)) { Assert.Fail("No TargetFile specified"); } if (string.IsNullOrEmpty(TargetSchema)) { Assert.Fail("No TargetSchema specified"); } if (string.IsNullOrEmpty(TargetVersion)) { Assert.Fail("No TargetVersion specified"); } var targetXml = GetXml(TargetFile, TargetSchema, TargetVersion); if (GenerateDiffFile) { if (!DiffFilePath.EndsWith("\\")) { DiffFilePath += "\\"; } var ext = Schema == TargetSchema ? Schema : Schema + TargetSchema; DiffFilePath = DiffFilePath + TargetFile.Substring(0, TargetFile.IndexOf(".", StringComparison.InvariantCultureIgnoreCase)) + "_" + ext + ".html"; } else { DiffFilePath = string.Empty; } if (ValidateOutput) { SchemaValidate(targetXml, TargetSchema, TargetVersion); } CheckXml(targetXml, candidate); }