0
I have a method that needs to return an Iobservable, but I’m having a lot of trouble. There is little content regarding this interface and what I find requires the use of the Reactive extension (https://docs.microsoft.com/en-us/previous-versions/dotnet/reactive-extensions/hh242985(v=vs.103)) Someone with knowledge regarding the Iobservable interface can confirm me if it is really only possible to return an Iobservable in a method with the use of that extension?
public class Graph<T> : IGraph<T>
{
public Graph(IEnumerable<ILink<T>> links)
{
}
public IObservable<IEnumerable<T>> RoutesBetween(T source, T target)
{
throw new NotImplementedException();
}
}}
Tamara, this new Microsoft mania to translate everything is problematic... Did you see this example? How to implement an observer Iobservable<T> Interface
– FabioIn
You installed the package System.Reactive.Linq ?
– novic
@Fabioin Hi Fabio. I came to see yes, but it didn’t help me much, unfortunately.
– Tamara Amorim
@Virgilionovic Hi Virgilio. I didn’t install it. Just to explain, I am doing a test for a company and the reference addition is blocked in the project and therefore I cannot install the package. So I would like to know if it is possible to return Iobservable without having to use Reactive.
– Tamara Amorim
Tamara does, because
IObservable
is ainterface
just implement a class and in return use the instance of that class– novic
@Virgilionovic Virgilio Thanks! I hadn’t thought about it. I’ll try and let you know if it works
– Tamara Amorim