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 };
 }
Example #3
0
 Task IGreeterWithObserver.Unsubscribe(IGreetObserver observer)
 {
     _observers.Remove(observer);
     return Task.FromResult(true);
 }
Example #4
0
 Task IGreeterWithObserver.Subscribe(IGreetObserver observer)
 {
     _observers.Add(observer);
     return Task.FromResult(true);
 }
Example #5
0
 void IGreeterWithObserverSync.Unsubscribe(IGreetObserver observer)
 {
     _observers.Remove(observer);
 }
Example #6
0
 void IGreeterWithObserverSync.Subscribe(IGreetObserver observer)
 {
     _observers.Add(observer);
 }
 void IGreeterWithObserverSync.Unsubscribe(IGreetObserver observer)
 {
     _observers.Remove(observer);
 }
 void IGreeterWithObserverSync.Subscribe(IGreetObserver observer)
 {
     _observers.Add(observer);
 }
Example #9
0
 Task IGreeterWithObserver.Unsubscribe(IGreetObserver observer)
 {
     _observers.Remove(observer);
     return(Task.FromResult(true));
 }
Example #10
0
 Task IGreeterWithObserver.Subscribe(IGreetObserver observer)
 {
     _observers.Add(observer);
     return(Task.FromResult(true));
 }