Skip to content

Commit

Permalink
minor changes to code format and bump version
Browse files Browse the repository at this point in the history
umbracotrd committed Dec 17, 2024
1 parent 056ca36 commit 11cdd70
Showing 4 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ public ProductFeedController(
public async Task<IActionResult> Xml(string path)
{
ProductFeedSettingReadModel? feedSettings = await _feedConfigService
.FindSettingAsync(new FindSettingParams {FeedRelativePath = path})
.FindSettingAsync(new FindSettingParams { FeedRelativePath = path })
.ConfigureAwait(true);
if (feedSettings == null)
{
@@ -33,7 +33,7 @@ public async Task<IActionResult> Xml(string path)
IProductFeedGeneratorService feedGenerator = _feedGeneratorFactory.GetGenerator(feedSettings.FeedType);
XmlDocument feed = feedGenerator.GenerateFeed(feedSettings);

var result = new XmlActionResult(feed) {Formatting = Formatting.Indented};
var result = new XmlActionResult(feed) { Formatting = Formatting.Indented };
return result;
}
}
Original file line number Diff line number Diff line change
@@ -13,19 +13,13 @@ public sealed class XmlActionResult : IActionResult

private readonly XmlDocument _document;

public Formatting Formatting { get; set; }
public string MimeType { get; set; }
public Formatting Formatting { get; set; } = Formatting.None;
public string MimeType { get; set; } = "text/xml";

public XmlActionResult(XmlDocument document)
{
if (document == null)
throw new ArgumentNullException("document");

ArgumentNullException.ThrowIfNull(document);
_document = document;

// Default values
MimeType = "text/xml";
Formatting = Formatting.None;
}

public async Task ExecuteResultAsync(ActionContext context)
@@ -39,7 +33,7 @@ public async Task ExecuteResultAsync(ActionContext context)
{
writer.Formatting = Formatting;
_document.WriteContentTo(writer);
writer.Flush();
await writer.FlushAsync();
}
}
catch (Exception ex)
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<Title>Umbraco Commerce Product Feeds Web</Title>
<Description>Contains apis</Description>
<Nullable>enable</Nullable>
<NoWarn>IDE0007</NoWarn>
<NoWarn>IDE0007;CA2007</NoWarn>
<StaticWebAssetBasePath>App_Plugins/umbracocommerceproductfeeds</StaticWebAssetBasePath>
</PropertyGroup>

2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "13.1.1",
"version": "13.1.2",
"assemblyVersion": {
"precision": "build"
},

0 comments on commit 11cdd70

Please sign in to comment.