Closed zhuxb711 closed 7 months ago
The parameter notes for pstReferenceTime
indicate
A pointer to a
SYSTEMTIME
value to use as the reference date and time. A null pointer can be passed ifsqro
is set to SQRO_DONT_RESOLVE_DATETIME. The 3.4.17 version couldn't allow for that so that prompted the change.
Can you help me understand more about your comment "Also unsafe code will break the IAsynEnumerable pattern."? Do you mean that you have to then have unsafe
blocks? If that is the case, I can overloads that support both options in Vanara so you can just use safe code.
Yes, better provide a overload for that because it's not possible to create a variable (unsafe pointer) without enabling unsafe switch for C#. For the code in 4.0.0, it's no possible to use fully safe pointer if you defined something parameter instead of IntPtr
The parameter notes for
pstReferenceTime
indicateA pointer to a
SYSTEMTIME
value to use as the reference date and time. A null pointer can be passed ifsqro
is set to SQRO_DONT_RESOLVE_DATETIME.The 3.4.17 version couldn't allow for that so that prompted the change.
Can you help me understand more about your comment "Also unsafe code will break the IAsynEnumerable pattern."? Do you mean that you have to then have
unsafe
blocks? If that is the case, I can overloads that support both options in Vanara so you can just use safe code.
If you try to use unsafe code in a function that returns IAsyncEnumerable. You will get an error from the compiler: "Unsafe code may not appear in iterators"
Thank you. I'll dig into this and find a resolution.
Fixed in 4.0.1
Thanks, and hope will release 4.0.1 soon~
Describe the bug and how to reproduce Vanara should not allow passing the unsafe pointer as the parameter to the "SearchApi.IQuerySolution.Resolve()", which will force every program to enable unsafe switch. Also unsafe code will break the IAsynEnumerable pattern.
Expected behavior Should be the same as 3.4.17