protected private override void convertSpanImpl(ReadOnlySpan <string?> src, Span <double> dst) { for (int i = 0; i < src.Length; i++) { dst[i] = ASString.AS_toNumber(src[i]); } }
public void convertFromStringTest_array(string[] data) { runConvertArrayTest <string, int>(data, x => ASString.AS_toInt(x)); runConvertArrayTest <string, uint>(data, x => ASString.AS_toUint(x)); runConvertArrayTest <string, double>(data, x => ASString.AS_toNumber(x), AssertHelper.floatIdentical); runConvertArrayTest <string, bool>(data, x => ASString.AS_toBoolean(x)); runConvertArrayTest <string, string>(data, x => x); runConvertArrayTest <string, ASObject>(data, x => x, (expected, actual) => { if (expected != null) { Assert.IsType <ASString>(actual); Assert.Equal((string)expected, (string)actual); } else { Assert.Null(actual); } }); runConvertArrayTest <string, ASAny>(data, x => x, (expected, actual) => { if (expected.value != null) { Assert.IsType <ASString>(actual.value); Assert.Equal((string)expected, (string)actual); } else { AssertHelper.identical(ASAny.@null, actual); } }); runConvertArrayTest(data, invalidConversion <string, GenericTypeConvertersTest_CA>); runConvertArrayTest(data, invalidConversion <string, GenericTypeConvertersTest_IA>); runConvertArrayTest(data, invalidConversion <string, GenericTypeConvertersTest_NonASType1>); }
public override double convert(string?value) => ASString.AS_toNumber(value);