public async Task <IBuildType> CreateBuildType(string name, string sourceBuildTypeLocator = null, bool copyAllAssociatedSettings = false, bool shareVCSRoots = false) { var dto = new NewBuildTypeDescription { Name = name, SourceBuildTypeLocator = sourceBuildTypeLocator, CopyAllAssociatedSettings = copyAllAssociatedSettings, ShareVCSRoots = shareVCSRoots }; return(await CreateBuildType(dto)); }
private async Task <IBuildType> CreateBuildType(NewBuildTypeDescription dto) { var xml = new StringBuilder(); using (var tw = new StringWriter(xml)) { var serializer = new XmlSerializer(typeof(NewBuildTypeDescription)); serializer.Serialize(tw, dto); } var buildTypeDto = await Service.CreateBuildType(xml.ToString()).ConfigureAwait(false); return(await BuildType.Create(buildTypeDto.Id, Instance).ConfigureAwait(false)); }