We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
namespace GoogleSheet.Type { [Type(typeof((int, int)), new string[] { "(int,int)", "(Int32,Int32)" })] public class IntTupleX2Type : IType { public object DefaultValue => null; public object Read(string value) { var datas = ReadUtil.GetBracketValueToArray(value); if (datas.Length == 0 || datas.Length == 1 || datas.Length > 2) { throw new UGSValueParseException("Parse Faield => " + value + " To " + this.GetType().Name); } else { return (datas[0], datas[1]); } } public string Write(object value) { var tuple = (((int, int))value); return $"[{tuple.Item1},{tuple.Item2}]"; } } }
원본 코드에 따르면 시트에서 읽어들인 string 형식의 자료형을 int로 파싱하지 않고 적용하고 있다.
namespace GoogleSheet.Type { [Type(typeof((int, int)), new string[] { "(int,int)", "(Int32,Int32)" })] public class IntTupleX2Type : IType { public object DefaultValue => null; public object Read(string value) { var datas = ReadUtil.GetBracketValueToArray(value); if (datas.Length == 0 || datas.Length == 1 || datas.Length > 2) { throw new UGSValueParseException("Parse Faield => " + value + " To " + this.GetType().Name); } (int, int) tuple; if (int.TryParse(datas[0], out tuple.Item1) && int.TryParse(datas[1], out tuple.Item2)) return tuple; throw new UGSValueParseException("Parse Faield => " + value + " To " + this.GetType().Name); } public string Write(object value) { var tuple = ((int, int))value; return $"[{tuple.Item1},{tuple.Item2}]"; } } }
다음과 같이 코드를 수정한다면 이슈를 해결할 수 있습니다.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
원본 코드에 따르면 시트에서 읽어들인 string 형식의 자료형을 int로 파싱하지 않고 적용하고 있다.
다음과 같이 코드를 수정한다면 이슈를 해결할 수 있습니다.
The text was updated successfully, but these errors were encountered: