add version 0.0.1
This commit is contained in:
@@ -23,11 +23,17 @@ internal static class Parser
|
||||
{
|
||||
var name = i.GetAttribute("name");
|
||||
var type = i.GetAttribute("type");
|
||||
var value = i.SelectSingleNode("descendant::value")?.InnerXml;
|
||||
var comment = i.SelectSingleNode("descendant::comment")?.InnerXml ?? string.Empty;
|
||||
var value = i.SelectSingleNode("descendant::value")?.InnerXml ?? string.Empty;
|
||||
|
||||
return new Resource(name, value ?? string.Empty)
|
||||
return new Resource(name, value)
|
||||
{
|
||||
Type = type
|
||||
Type = string.IsNullOrWhiteSpace(type)
|
||||
? Option<string>.None
|
||||
: Option<string>.Some(type),
|
||||
Comment = string.IsNullOrWhiteSpace(comment)
|
||||
? Option<string>.None
|
||||
: Option<string>.Some(comment)
|
||||
};
|
||||
}).ToArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user