-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
111 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/BUTR.CrashReportServer/Models/Sitemaps/ChangeFrequency.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Xml.Serialization; | ||
|
||
namespace BUTR.CrashReportServer.Models.Sitemaps; | ||
|
||
[Serializable] | ||
public enum ChangeFrequency | ||
{ | ||
[XmlEnum(Name = "always")] | ||
Always, | ||
|
||
[XmlEnum(Name = "hourly")] | ||
Hourly, | ||
|
||
[XmlEnum(Name = "daily")] | ||
Daily, | ||
|
||
[XmlEnum(Name = "weekly")] | ||
Weekly, | ||
|
||
[XmlEnum(Name = "monthly")] | ||
Monthly, | ||
|
||
[XmlEnum(Name = "yearly")] | ||
Yearly, | ||
|
||
[XmlEnum(Name = "never")] | ||
Never | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Xml.Serialization; | ||
|
||
namespace BUTR.CrashReportServer.Models.Sitemaps; | ||
|
||
[XmlRoot(ElementName="url", Namespace="http://www.sitemaps.org/schemas/sitemap/0.9")] | ||
public class Url | ||
{ | ||
[XmlElement(ElementName="loc", Namespace="http://www.sitemaps.org/schemas/sitemap/0.9")] | ||
public string Location { get; set; } | ||
|
||
[XmlIgnore] | ||
public DateTime TimeStamp { get; set; } | ||
|
||
[XmlElement(ElementName="lastmod", Namespace="http://www.sitemaps.org/schemas/sitemap/0.9")] | ||
public string LastMod | ||
{ | ||
get => TimeStamp.ToString("yyyy-MM-ddTHH:mm:sszzz"); | ||
set => TimeStamp = DateTime.Parse(value); | ||
} | ||
|
||
[XmlElement(ElementName="changefreq", Namespace="http://www.sitemaps.org/schemas/sitemap/0.9")] | ||
public ChangeFrequency ChangeFrequency { get; set; } | ||
|
||
[XmlElement(ElementName="priority", Namespace="http://www.sitemaps.org/schemas/sitemap/0.9")] | ||
public double Priority { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Collections.Generic; | ||
using System.Xml.Serialization; | ||
|
||
namespace BUTR.CrashReportServer.Models.Sitemaps; | ||
|
||
[XmlRoot(ElementName="urlset", Namespace="http://www.sitemaps.org/schemas/sitemap/0.9")] | ||
public class Urlset { | ||
|
||
[XmlElement(ElementName="url", Namespace="http://www.sitemaps.org/schemas/sitemap/0.9")] | ||
public List<Url> Url { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters