Ejemplo n.º 1
0
        public void LogWarning(string message, params object[] messageArgs)
        {
            var logEntry = new PsXdtConfigTransformLogEntry()
            {
                Message     = message,
                MessageArgs = messageArgs
            };

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

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

            _cmdlet.WriteVerbose(logEntry.ToString());
        }
Ejemplo n.º 4
0
        public void LogErrorFromException(Exception ex)
        {
            var logEntry = new PsXdtConfigTransformLogEntry()
            {
                Exception = ex
            };

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

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

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

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

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

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

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