Пример #1
0
        /// <summary>
        /// Initializes this instance.
        /// </summary>
        /// <returns>Yield Returns on the Choice</returns>
        private IEnumerator <ITask> Initialize()
        {
            // subscribe to log analyzer
            var notificationPort = new loganalyzer.DssLogAnalyzerOperations();

            Activate(Arbiter.ReceiveWithIterator <loganalyzer.LogFilesLoaded>(true, notificationPort, this.LogFilesLoaded));
            Activate(Arbiter.ReceiveWithIterator <loganalyzer.EnvelopesSelected>(true, notificationPort, this.EnvelopesSelected));

            var sub = new loganalyzer.Subscribe();

            sub.NotificationPort = notificationPort;
            sub.Body.TypeFilter  = new string[]
            {
                GetTypeFilterDescription <loganalyzer.LogFilesLoaded>(),
                GetTypeFilterDescription <loganalyzer.EnvelopesSelected>()
            };
            this.logAnalyzer.Post(sub);
            yield return(sub.ResponsePort.Choice(
                             success => { },
                             fault => LogError(fault)));
        }
 public void SubscribeHandler(Subscribe subscribe)
 {
     SubscribeHelper(this.submgrPort, subscribe.Body, subscribe.ResponsePort);
 }