Skip to content

Commit

Permalink
Fix Release build failure
Browse files Browse the repository at this point in the history
Generated XamlTypeInfo.g.cs contained invalid code for @ref. It's not my bug but I can fix it by avoiding @ref.
Related (may be):
microsoft/microsoft-ui-xaml#8723
  • Loading branch information
kurema committed Apr 25, 2024
1 parent fb21c48 commit f33232b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions BookViewerApp/Storages/NetworkInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public partial class networksOPDSEntry {

private string idField;

private string refField;
private string referenceField;

public networksOPDSEntry() {
this.excludedField = false;
Expand Down Expand Up @@ -148,12 +148,12 @@ public string id {

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string @ref {
public string reference {
get {
return this.refField;
return this.referenceField;
}
set {
this.refField = value;
this.referenceField = value;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion BookViewerApp/Storages/NetworkInfo.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<xs:attribute name="source" type="xs:anyURI" />
<xs:attribute name="excluded" type="xs:boolean" use="optional" default="false" />
<xs:attribute name="id" type="xs:string" use="optional" />
<xs:attribute name="ref" type="xs:string" use="optional" />
<xs:attribute name="reference" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
</xs:choice>
Expand Down
6 changes: 3 additions & 3 deletions BookViewerApp/Storages/NetworkInfoStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static async Task Load()
{
if (!dic.ContainsKey(entry.id)) list.Add(new NetworkInfo.networksOPDSEntry()
{
@ref = entry.id,
reference = entry.id,
});
}
}
Expand All @@ -38,13 +38,13 @@ public static async Task Load()
{
foreach (var item in NetworkInfoLocal.Content?.OPDSBookmarks)
{
if (string.IsNullOrEmpty(item.@ref))
if (string.IsNullOrEmpty(item.reference))
{
yield return item;
}
else
{
var current = preset.FirstOrDefault(a => a.id == item.@ref);
var current = preset.FirstOrDefault(a => a.id == item.reference);
if (current is not null) yield return current;
}
}
Expand Down

0 comments on commit f33232b

Please sign in to comment.