Example #1
0
 public VstsBuildTaskServiceEndpointCredentialProvider(ILogger logger)
     : base(logger)
 {
     LazyCredentials = new Lazy <Dictionary <string, EndpointCredentials> >(() =>
     {
         return(ParseJsonToDictionary());
     });
 }
 /// <summary>
 /// Writes a <see cref="LogLevel.Verbose"/> event message to the <see cref="ILogger"/> using the specified message.
 /// </summary>
 /// <param name="logger">A <see cref="ILogger"/> instance to write the message to.</param>
 /// <param name="message">The message.</param>
 public static void Verbose(this ILogger logger, string message)
 {
     logger.Log(LogLevel.Verbose, message);
 }
 /// <summary>
 /// Writes a <see cref="LogLevel.Information"/> event message to the <see cref="ILogger"/> using the specified message.
 /// </summary>
 /// <param name="logger">A <see cref="ILogger"/> instance to write the message to.</param>
 /// <param name="message">The message.</param>
 public static void Info(this ILogger logger, string message)
 {
     logger.Log(LogLevel.Information, message);
 }
 /// <summary>
 /// Writes a <see cref="LogLevel.Minimal"/> event message to the <see cref="ILogger"/> using the specified message.
 /// </summary>
 /// <param name="logger">A <see cref="ILogger"/> instance to write the message to.</param>
 /// <param name="message">The message.</param>
 public static void Minimal(this ILogger logger, string message)
 {
     logger.Log(LogLevel.Minimal, message);
 }
 /// <summary>
 /// Writes a <see cref="LogLevel.Warning"/> event message to the <see cref="ILogger"/> using the specified message.
 /// </summary>
 /// <param name="logger">A <see cref="ILogger"/> instance to write the message to.</param>
 /// <param name="message">The message.</param>
 public static void Warning(this ILogger logger, string message)
 {
     logger.Log(LogLevel.Warning, message);
 }
 /// <summary>
 /// Writes a <see cref="LogLevel.Error"/> event message to the <see cref="ILogger"/> using the specified message.
 /// </summary>
 /// <param name="logger">A <see cref="ILogger"/> instance to write the message to.</param>
 /// <param name="message">The message.</param>
 public static void Error(this ILogger logger, string message)
 {
     logger.Log(LogLevel.Error, message);
 }
 /// <summary>
 /// Writes a <see cref="LogLevel.Error"/> event message to the <see cref="ILogger"/> using the specified message.
 /// </summary>
 /// <param name="logger">A <see cref="ILogger"/> instance to write the message to.</param>
 /// <param name="logLevel">The level to log at.</param>
 /// <param name="message">The message.</param>
 public static void Log(this ILogger logger, LogLevel logLevel, string message)
 {
     logger.Log(logLevel, true, message);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RequestHandlerBase{TRequest, TResponse}"/> class.
 /// </summary>
 /// <param name="logger">A <see cref="Logging.ILogger"/> to use for logging.</param>
 protected RequestHandlerBase(ILogger logger)
 {
     Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }