Ejemplo n.º 1
0
        /// <summary>
        /// Constructs a new instance of FramingReader.
        /// </summary>
        /// <param name="baseReader">The EmberReader used to decode the ember data.</param>
        /// <param name="keepAliveCallback">A callback function that is subscribed to
        /// the KeepAliveRequestReceived event.</param>
        public FramingReader(AsyncEmberReader baseReader, EventHandler<KeepAliveRequestReceivedArgs> keepAliveCallback)
        {
            if(baseReader == null)
            throw new ArgumentNullException("baseReader");

             BaseReader = baseReader;

             if(keepAliveCallback != null)
            KeepAliveRequestReceived += keepAliveCallback;

             _rxFrame = new S101.RxFrame();
             _rxFrame.MessageReceived += RxFrame_MessageReceived;
        }
      /// <summary>
      /// Constructs a new instance of FramingReader.
      /// </summary>
      /// <param name="baseReader">The EmberReader used to decode the ember data.</param>
      /// <param name="keepAliveCallback">A callback function that is subscribed to
      /// the KeepAliveRequestReceived event.</param>
      public FramingReader(AsyncEmberReader baseReader, EventHandler<KeepAliveRequestReceivedArgs> keepAliveCallback)
      {
         if(baseReader == null)
            throw new ArgumentNullException("baseReader");

         BaseReader = baseReader;

         if(keepAliveCallback != null)
            KeepAliveRequestReceived += keepAliveCallback;

         _rxFrame = new S101.RxFrame();
         _rxFrame.MessageReceived += RxFrame_MessageReceived;
      }
 /// <summary>
 /// Creates a new instance of GlowReader.
 /// </summary>
 /// <param name="baseReader">An AsyncEmberReader used for decoding incoming Ember+ packages.</param>
 /// <param name="keepAliveCallback">A callback to be subscribed to the KeepAliveRequest event.</param>
 public GlowReader(AsyncEmberReader baseReader, EventHandler <KeepAliveRequestReceivedArgs> keepAliveCallback)
     : base(baseReader, keepAliveCallback)
 {
     PackageReceived += new EventHandler <PackageReceivedArgs>(HandlePackageReceived);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new instance of GlowReader.
 /// </summary>
 /// <param name="baseReader">An AsyncEmberReader used for decoding incoming Ember+ packages.</param>
 /// <param name="keepAliveCallback">A callback to be subscribed to the KeepAliveRequest event.</param>
 public GlowReader(AsyncEmberReader baseReader, EventHandler<KeepAliveRequestReceivedArgs> keepAliveCallback)
     : base(baseReader, keepAliveCallback)
 {
     PackageReceived += new EventHandler<PackageReceivedArgs>(HandlePackageReceived);
 }