After using converters (Redgate, Telerik, ...) I can not turn this expression c # to vb.net
if (afterItemRemoved != null)
{
cacheItemPolicy.RemovedCallback = x => afterItemRemoved(
x.CacheItem.Key,
(T)x.CacheItem.Value);
}
I have tried without success the following expressions (Reflector 8.5 de RedGate y converter.telerik.com)
If (afterItemRemoved IsNot Nothing) Then
cacheItemPolicy.RemovedCallback = x => afterItemRemoved.Invoke(x.CacheItem.Key, DirectCast(x.CacheItem.Value, T))
End If
If afterItemRemoved IsNot Nothing Then
cacheItemPolicy.RemovedCallback = Function(x) afterItemRemoved(x.CacheItem.Key, DirectCast(x.CacheItem.Value, T))
End If