There is the code: - Private Sub InsertItemInCache(Of T)(ByVal item As CachedItem(Of T), ByVal dependency As AggregateCacheDependency, _
-
ByVal key As String, ByVal updateCallBack As CacheItemUpdateCallback)
The signature of CacheItemUpdateCallback is: - Sub CacheItemUpdateCallback(ByVal key As String, ByVal reason As CacheItemUpdateReason, _
-
ByRef expensiveObject As Object, ByRef dependency As CacheDependency, ByRef absoluteExpiration As Date, _
-
ByRef slidingExpiration As TimeSpan)
I want to call InsertItemInCache function using lamba expression for this.
This code is not compiled: - InsertItemInCache(cachedItem, dependency, key, Function(k, r, e, d, a, s) CacheItemUpdateCallback(k, r, e, d, a, s))
it says Expression does not produce a value
If I change Sub CacheItemUpdateCallback to Function CacheItemUpdateCallback
it also is not compiled
Can anyone help me to call this method via lambda expression? I want to use closure in the future and call this function in such way: - InsertItemInCache(cachedItem, dependency, key, Function(k, r, e, d, a, s) CacheItemUpdateCallbackNew(k, r, e, d, a, s, additionalParameter1, additionalParameter2, additionalParameter3))
0 879 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Matthias Kaeppler |
last post by:
Hi,
in my program, I have this funtion to compute the sum of a bunch of files:
Glib::ustring DirBrowser::get_total_file_size()
{
using namespace boostfs; // boostfs = boost::filesystem
using...
|
by: rammel |
last post by:
hi,
can't I call member functions from an placeholder of a boost-like
lambda expression?
look on the example below please:
-----------------------------------------------------------...
|
by: Matt |
last post by:
Hi There,
Can anyone explain me the real advantages of (other than syntax)
lambda expressions over anonymous delegates?
advantage for one over the other.
delegate int F(int a);
F fLambda = a...
|
by: =?Utf-8?B?UnV0aCBNYXJr?= |
last post by:
Hey,
Am trying to write a lambda expression for a delegate, am getting an error as
------------------------------
only assignment, call, increment, decrement, and new expression can be used
as...
|
by: sneha0608 |
last post by:
I am using LINQ.I want to dynamically build a lambda expression which would be passed to the where clause of the Query.
i have written the following code:
ParameterExpression param =...
|
by: Satish |
last post by:
When i compile this function I get the error Cannot convert lambda
expression of type System.delegate because it is not a delegate type.
private void SetStatus(string status)
{
if...
|
by: Simon Woods |
last post by:
Hi
A blog post I was reading (http://www.defmacro.org/ramblings/fp.html)
included this lambda function.
Function makeIncrementer() {
int n = 0;
int increment() {
return ++n;
|
by: Marc Gravell |
last post by:
A lambda expression is a short form to write a delegate
In /this/ case (LINQ-to-Objects): yes - but it could equally be compiled
to an Expression, which is very, very different.
A lambda...
|
by: Colin Han |
last post by:
Hi, all,
If I write follow code in c# method. The IDE will compile it to a complex construct method of System.Linq.Expression.
Expression<Func<int>ex = () =10;
will be compile to:...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |