private static UAUnicodeChar CreateUAUnicodeCharFromXmlNode(XmlNode UAUnicodeCharTag) { XmlAttributeCollection a = UAUnicodeCharTag.Attributes; UAUnicodeChar chr = new UAUnicodeChar(a["Name"].Value, UInt32.Parse(a["CodePoint"].Value, System.Globalization.NumberStyles.AllowHexSpecifier)); return(chr); }
public static string CreateRegexFromChar(UAUnicodeChar c) { return(UnicodeTestCase.CreateRegexFromList(new List <UAUnicodeChar>() { c })); }
public UnicodeTestCase(UnicodeTestCaseTypes type, UAUnicodeChar target, UAUnicodeChar source, string description) { this.type = type; this.target = target; this.sourcePoint = source; this.enabled = true; this.description = description; }
private static UnicodeTestCase ParseTraditional(XmlNode UAUnicodeCharMappingRootXmlNode) { // UAUnicodeChar source = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.FirstChild); UAUnicodeChar target = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.FirstChild); UAUnicodeChar source = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.FirstChild); // string description = UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.InnerText; string description = UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.NextSibling.InnerText; return(new UnicodeTestCase(UnicodeTestCaseTypes.Traditional, target, source, description.Trim(XmlMappingLoader.TrimChars))); }
private static UnicodeTestCase ParseTransformable(XmlNode UAUnicodeCharMappingRootXmlNode) { UAUnicodeChar target = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.FirstChild); UAUnicodeChar source = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.FirstChild); //Transformation //Transformation t = GetTransformationFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.NextSibling); string description = UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.NextSibling.NextSibling.InnerText; return(new UnicodeTestCase(UnicodeTestCaseTypes.Transformable, target, source, description.Trim(XmlMappingLoader.TrimChars))); }
public static string CreateRegexFromChar(UAUnicodeChar c) { return UnicodeTestCase.CreateRegexFromList(new List<UAUnicodeChar>() { c }); }
private static UAUnicodeChar CreateUAUnicodeCharFromXmlNode(XmlNode UAUnicodeCharTag) { XmlAttributeCollection a = UAUnicodeCharTag.Attributes; UAUnicodeChar chr = new UAUnicodeChar(a["Name"].Value, UInt32.Parse(a["CodePoint"].Value, System.Globalization.NumberStyles.AllowHexSpecifier)); return chr; }