public Task DoSomeSubscription()
{
return Task.Run(() =>
{
// my object is also injected as a singleton;
// the subscription looks like it's not made
myObj.Changed += (c) =>
{
Console.WriteLine(c);
};
// this triggers the event, but it never enters the subscription above if the method is called from the gRPC service
// it enters from the normal singleton service
myObj.Change(3);
};
}
public Task DoSomeSubscription()
{
return Task.Run(() =>
{
// my object is also injected as a singleton;
// the subscription looks like it's not made
myObj.Changed += (c) =>
{
Console.WriteLine(c);
};
// this triggers the event, but it never enters the subscription above if the method is called from the gRPC service
// it enters from the normal singleton service
myObj.Change(3);
};
}