Example #1
0
        public void LogWarning(string message, params object[] messageArgs)
        {
            var logEntry = new Ps4XdtConfigTransformLogEntry()
            {
                Message     = message,
                MessageArgs = messageArgs
            };

            _cmdlet.WriteWarning(logEntry.ToString());
        }
Example #2
0
        public void EndSection(string message, params object[] messageArgs)
        {
            var logEntry = new Ps4XdtConfigTransformLogEntry()
            {
                Message     = message,
                MessageArgs = messageArgs
            };

            _cmdlet.WriteVerbose(logEntry.ToString());
        }
Example #3
0
        public void LogMessage(MessageType type, string message, params object[] messageArgs)
        {
            var logEntry = new Ps4XdtConfigTransformLogEntry()
            {
                MessageType = type.ToString(),
                Message     = message,
                MessageArgs = messageArgs
            };

            _cmdlet.WriteVerbose(logEntry.ToString());
        }
Example #4
0
        public void LogErrorFromException(Exception ex)
        {
            var logEntry = new Ps4XdtConfigTransformLogEntry()
            {
                Exception = ex
            };

            var exception = new InvalidOperationException(logEntry.ToString());

            _cmdlet.WriteError(new ErrorRecord(exception, null, ErrorCategory.InvalidOperation, null));
        }
Example #5
0
        public void LogError(string message, params object[] messageArgs)
        {
            var logEntry = new Ps4XdtConfigTransformLogEntry()
            {
                Message     = message,
                MessageArgs = messageArgs
            };

            var exception = new InvalidOperationException(logEntry.ToString());

            _cmdlet.WriteError(new ErrorRecord(exception, null, ErrorCategory.InvalidOperation, null));
        }
Example #6
0
        public void LogWarning(string file, int lineNumber, int linePosition, string message, params object[] messageArgs)
        {
            var logEntry = new Ps4XdtConfigTransformLogEntry()
            {
                File         = file,
                LineNumber   = lineNumber,
                LinePosition = linePosition,
                Message      = message,
                MessageArgs  = messageArgs
            };

            _cmdlet.WriteWarning(logEntry.ToString());
        }
Example #7
0
        public void LogErrorFromException(Exception ex, string file, int lineNumber, int linePosition)
        {
            var logEntry = new Ps4XdtConfigTransformLogEntry()
            {
                File         = file,
                Exception    = ex,
                LineNumber   = lineNumber,
                LinePosition = linePosition
            };

            var exception = new InvalidOperationException(logEntry.ToString());

            _cmdlet.WriteError(new ErrorRecord(exception, null, ErrorCategory.InvalidOperation, null));
        }