コード例 #1
0
        private void Dispose(bool disposing)
        {
            if (!_disposed) {
                if (disposing) {
                    using (var blink1 = new Blink1()) {
                        try {
                            blink1.Open();
                            blink1.SetColor(0, 0, 0);
                        } catch(InvalidOperationException) {}
                    }
                }
            }

            _disposed = true;
        }
コード例 #2
0
        private void ReportStatus(IBuildDetail build, string color)
        {
            if (!ShouldDisplayNotification(build)) {
                return;
            }

            using (var blink1 = new Blink1()) {
                try {
                    blink1.Open();
                    blink1.SetColor(0, 0, 0);
                    blink1.FadeToColor(750, new HtmlHexadecimal(color), true);
                } catch (InvalidOperationException exception) {
                    _logger.ErrorException(exception.Message, exception);
                } finally {
                    blink1.Complete();
                }
            }
        }