Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PingService"/> class.
        /// </summary>
        /// <param name="commonServices">The common services.</param>
        /// <param name="applicationLifetime">The application lifetime.</param>
        /// <exception cref="ArgumentNullException">commonServices</exception>
        /// <autogeneratedoc />
        public PingService(ICommonServices commonServices, IApplicationLifetime applicationLifetime = null) :
            base(commonServices, applicationLifetime, ServiceHost.PingService)
        {
            // base throws if (commonServices == null) throw new ArgumentNullException(nameof(commonServices));

            OnPingReplyService += PingReplyLoggingEventHandler;

            _pingTask = new PingTaskImpl(commonServices);
            _pingTask.OnPingReplyTask += PingTaskReplyEventHandler;
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PingServiceRx"/> class.
 /// </summary>
 /// <param name="commonServices">The common services.</param>
 /// <exception cref="ArgumentNullException">commonServices</exception>
 /// <autogeneratedoc />
 public PingServiceRx(ICommonServices commonServices)
 {
     _pingTask = new PingService.PingTaskImpl(commonServices);
 }