private static NsPrefix GetNsDefinition(UnprocessedAttributeBase assignment) { if (assignment.Locator.Prefix == "xmlns") { return(new NsPrefix(assignment.Locator.PropertyName, assignment.Value)); } if (assignment.Locator.PropertyName == "xmlns") { return(new NsPrefix("", assignment.Value)); } throw new XamlParseException($"Cannot extract a Namespace Prefix Definition from this assignment: {assignment}"); }
private static NsPrefix GetNsDefinition(UnprocessedAttributeBase assignment) { if (assignment.Locator.Prefix == "xmlns") { return new NsPrefix(assignment.Locator.PropertyName, assignment.Value); } if (assignment.Locator.PropertyName == "xmlns") { return new NsPrefix("", assignment.Value); } throw new ParseException($"Cannot extract a Namespace Prefix Definition from this assignment: {assignment}"); }