sbox-issues icon indicating copy to clipboard operation
sbox-issues copied to clipboard

Whitelist Task related stuff

Open GavrilovNI opened this issue 1 year ago • 1 comments

What it is?

There are some things that i think should be whitelisted:

Task.IsCanceled Task.IsFaulted

this kinda can be accessed by Task.Status, so not sure why they are not whitelisted

Task.Exception

Usually this is needed to handle it in Task.ContinueWith and then rethrow it

OperationCanceledException

cant do new OperationCanceledException(), constructor is not whitelisted but we can use new TaskCanceledException();

BUT we can't

try
{
}
catch ( OperationCanceledException  ex)
{
	Log.Info( ex );
}

Why do you need to use this?

It whould allow me to work with async as normal person

P.S. I can't wash my balls in async with pleasure without all of said above

GavrilovNI avatar Feb 15 '24 23:02 GavrilovNI

@garrynewman it looks like Task.IsCanceled Task.IsFaulted Task.Exception are not whitelisted can you please reopen the issue?

GavrilovNI avatar Mar 01 '24 22:03 GavrilovNI

Look whitelisted to me

garrynewman avatar Sep 13 '24 04:09 garrynewman