Example #1
0
        /// <summary>
        /// Class constructor that takes a Function Handler and initializes the class.
        /// </summary>
        public RuntimeSupportInitializer(string handler)
        {
            if (string.IsNullOrWhiteSpace(handler))
            {
                throw new ArgumentException("Cannot initialize RuntimeSupportInitializer with a null of empty Function Handler", nameof(handler));
            }

            _logger = InternalLogger.GetDefaultLogger();

            _handler       = handler;
            _debugAttacher = new RuntimeSupportDebugAttacher();
        }
Example #2
0
        /// <summary>
        /// Class constructor that takes a Function Handler and initializes the class.
        /// </summary>
        public RuntimeSupportInitializer(string handler)
        {
            if (string.IsNullOrWhiteSpace(handler))
            {
                throw new ArgumentException("Cannot initialize RuntimeSupportInitializer with a null of empty Function Handler", nameof(handler));
            }


            if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(DebuggingEnvironmentVariable)))
            {
                _logger = InternalLogger.NoOpLogger;
            }
            else
            {
                _logger = InternalLogger.ConsoleLogger;
            }

            _handler       = handler;
            _debugAttacher = new RuntimeSupportDebugAttacher();
        }