public static SurrogateForIGreetObserver Convert(IGreetObserver value) { if (value == null) { return(null); } var o = (GreetObserver)value; return(new SurrogateForIGreetObserver { Channel = o.Channel, ObserverId = o.ObserverId }); }
public static SurrogateForIGreetObserver Convert(IGreetObserver value) { if (value == null) return null; var o = (GreetObserver)value; return new SurrogateForIGreetObserver { Channel = o.Channel, ObserverId = o.ObserverId }; }
Task IGreeterWithObserver.Unsubscribe(IGreetObserver observer) { _observers.Remove(observer); return Task.FromResult(true); }
Task IGreeterWithObserver.Subscribe(IGreetObserver observer) { _observers.Add(observer); return Task.FromResult(true); }
void IGreeterWithObserverSync.Unsubscribe(IGreetObserver observer) { _observers.Remove(observer); }
void IGreeterWithObserverSync.Subscribe(IGreetObserver observer) { _observers.Add(observer); }
Task IGreeterWithObserver.Unsubscribe(IGreetObserver observer) { _observers.Remove(observer); return(Task.FromResult(true)); }
Task IGreeterWithObserver.Subscribe(IGreetObserver observer) { _observers.Add(observer); return(Task.FromResult(true)); }