You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an example:
1) We have to create a string for literal l'2014-09-19T12:13:14+00:00'
2) Test it using the created substring
3) Create the DateTimeOffset instance using that string
4) The created substring goes into the GC
Moreover, most of time, we don't need the 'substring', for example, "(", ")", etc, They are special but no other meaning, just a label. We don't need to create a substring for all of them.
In a summary, it seems we don't need to create a 'new string'. Because the literal is there (in the original raw string), we just need to retrieve it when we do need it. And most importantly, if we just test it (to see whether it's a valid DateTimeOffset literal), we can just test the PART of original raw string, don't need to create a new substring.
Expected result
What would happen if there wasn't a bug.
Actual result
What is actually happening.
Additional detail
Optional, details of the root cause if known. Delete this section if you have no additional details to add.
The text was updated successfully, but these errors were encountered:
Short summary (3-5 sentences) describing the issue.
Assemblies affected
Which assemblies and versions are known to be affected e.g. OData .Net lib 7.x
ODL has lot of string parsing scenarios, for example:
The typical parsing process is:
For example:
"abc(2014-09-19T12:13:14+00:00)/3258.678765765489753678965390/SRID=1234(POINT(1020))/Function(foo=@x,bar=1,baz=@y)"
If do a lexer, we can get the following tokens:
As an example:
1) We have to create a string for literal l'2014-09-19T12:13:14+00:00'
2) Test it using the created substring
3) Create the DateTimeOffset instance using that string
4) The created substring goes into the GC
Moreover, most of time, we don't need the 'substring', for example, "(", ")", etc, They are special but no other meaning, just a label. We don't need to create a substring for all of them.
In a summary, it seems we don't need to create a 'new string'. Because the literal is there (in the original raw string), we just need to retrieve it when we do need it. And most importantly, if we just test it (to see whether it's a valid DateTimeOffset literal), we can just test the PART of original raw string, don't need to create a new substring.
Expected result
What would happen if there wasn't a bug.
Actual result
What is actually happening.
Additional detail
Optional, details of the root cause if known. Delete this section if you have no additional details to add.
The text was updated successfully, but these errors were encountered: