Ejemplo n.º 1
0
        public ReadAndWriteToRoomExtender()
        {
            _counter       = 65;
            _myAddress     = new byte[] { 0xAA, 0xAA, 0xAA, 0xAA, 0x00 };
            _reAddress     = new byte[] { 0xBB, 0xBB, 0xBB, 0xBB, 0x00 };
            SendAddress    = _myAddress;
            ReceiveAddress = _reAddress;

            _manualResetEvent = new ManualResetEvent(false);
            _syncRoot         = new object();

            _taskFactory = new TaskFactory(TaskCreationOptions.LongRunning, TaskContinuationOptions.ExecuteSynchronously);

            ILoggerFactoryAdapter loggerFactory = new DebugOutLoggerFactoryAdapter(LogLevel.All, true, true, true, "MM/dd/yyyy hh:mm:ss");

            _logger = loggerFactory.GetLogger(GetType());
        }
        public ReadAndWriteToRoomExtender()
        {
            _counter = 65;
            _myAddress = new byte[] { 0xAA, 0xAA, 0xAA, 0xAA, 0x00 };
            _reAddress = new byte[] { 0xBB, 0xBB, 0xBB, 0xBB, 0x00 };
            SendAddress = _myAddress;
            ReceiveAddress = _reAddress;

            _manualResetEvent = new ManualResetEvent(false);
            _syncRoot = new object();

            _taskFactory = new TaskFactory(TaskCreationOptions.LongRunning, TaskContinuationOptions.ExecuteSynchronously);

            ILoggerFactoryAdapter loggerFactory = new DebugOutLoggerFactoryAdapter(LogLevel.All, true, true, true, "MM/dd/yyyy hh:mm:ss");
            _logger = loggerFactory.GetLogger(GetType());

        }