Build updates#6
Merged
Merged
Conversation
| } | ||
| if (value is JObject jo) | ||
| { | ||
| return CanonicalizeJsonToken(jo, field.DataType) ?? jo; |
| // BrowseName "Default XML" / "Default JSON" / "Default Binary". | ||
| foreach (var node in _sequence) | ||
| { | ||
| if (node is UADataType dt && node.NodeId != null) |
Comment on lines
+1950
to
+1961
| if (child != null) | ||
| { | ||
| if (child.LocalName == "NamespaceIndex") | ||
| { | ||
| if (!Int16.TryParse(child.InnerText, out var value)) | ||
| { | ||
| throw new InvalidDataException($"{input.InnerText} is a QualifiedName."); | ||
| } | ||
|
|
||
| child = child.NextSibling as XmlElement; | ||
| } | ||
| } |
Comment on lines
+1963
to
+1969
| if (child != null) | ||
| { | ||
| if (child.LocalName == "Name") | ||
| { | ||
| name = child.InnerText.Trim(); | ||
| } | ||
| } |
Comment on lines
+1980
to
+1987
| if (child != null) | ||
| { | ||
| if (child.LocalName == "Locale") | ||
| { | ||
| locale = child.InnerText.Trim(); | ||
| child = child.NextSibling as XmlElement; | ||
| } | ||
| } |
Comment on lines
+1989
to
+1995
| if (child != null) | ||
| { | ||
| if (child.LocalName == "Text") | ||
| { | ||
| text = child.InnerText.Trim(); | ||
| } | ||
| } |
| private static byte[] TryFromBase64(string s) | ||
| { | ||
| try { return Convert.FromBase64String(s); } | ||
| catch { return Array.Empty<byte>(); } |
Comment on lines
+1891
to
+1894
| catch | ||
| { | ||
| throw new InvalidDataException($"{input.InnerText} is a DateTime."); | ||
| } |
Comment on lines
+74
to
+86
| foreach (var entry in fwds) | ||
| { | ||
| if (entry.ReferenceTypeId != HasEncodingRefId) continue; | ||
| if (!_nodes.TryGetValue(entry.TargetNodeId, out var encodingNode)) continue; | ||
| var encBn = StripNamespacePrefix(encodingNode.BrowseName); | ||
| if (encBn == null) continue; | ||
|
|
||
| _encodingToDataType[entry.TargetNodeId] = node.NodeId!; | ||
| if (string.Equals(encBn, DefaultXmlBrowseName, StringComparison.Ordinal)) | ||
| _dataTypeToXmlEncoding[node.NodeId!] = entry.TargetNodeId; | ||
| // Default JSON / Default Binary recorded in _encodingToDataType so reader-side | ||
| // normalization still works, but only XML needs the reverse map. | ||
| } |
Comment on lines
+162
to
+174
| foreach (var node in _sequence) | ||
| { | ||
| if (node.NodeClass != NodeClass.UAObject) continue; | ||
| var bn = StripNamespacePrefix(node.BrowseName); | ||
| if (!string.Equals(bn, DefaultJsonBrowseName, StringComparison.Ordinal)) continue; | ||
| // Confirm it really is a HasEncoding target of a DataType. | ||
| if (node.NodeId != null && | ||
| _inverseRefs.TryGetValue(node.NodeId, out var inv) && | ||
| inv.Any(e => e.ReferenceTypeId == HasEncodingRefId)) | ||
| { | ||
| toRemove.Add(node.NodeId); | ||
| } | ||
| } |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Get rid of build dir.