Example #1
0
        public CoreMessageManager(CoreStitchContext stitchContext, FromStitchMessageReader reader = null, ToStitchMessageSender sender = null)
        {
            if (stitchContext == null)
            {
                throw new ArgumentNullException(nameof(stitchContext));
            }

            _stitchContext = stitchContext;
            _reader        = reader ?? new FromStitchMessageReader(Console.OpenStandardInput());
            _sender        = sender ?? new ToStitchMessageSender(Console.OpenStandardOutput());
        }
Example #2
0
 public FromStitchReaderThread(FromStitchMessageReader reader)
 {
     _reader       = reader;
     _readerThread = new Thread(ReaderThreadFunction);
     _readerThread.IsBackground = true;
 }