public static void Start(IRemoteListener remoteListener) { _remoteListener = remoteListener; _cancellationSource = new CancellationTokenSource(); Task.Factory.StartNew(read, _cancellationSource.Token); }
/// <summary> /// Private constructor for singleton instance. /// </summary> private CastComms() { CastService = Factory.Current.Resolve <ICastService>(); CastActivityService = Factory.Current.Resolve <ICastActivityService>(); PlatformService = Factory.Current.Resolve <IPlatformService>(); HeartbeatListener = Factory.Current.Resolve <IRemoteListener>(); SendHeartbeatNowListener = Factory.Current.Resolve <IRemoteListener>(); ClientListener = Factory.Current.Resolve <IRemoteListener>(); }