Esempio n. 1
0
 /// <summary>
 /// Sets the current provider to the specified one.
 /// </summary>
 /// <param name="provider">Environment information provider instance</param>
 public static void Configure(IEnvironmentInfoProvider provider)
 {
     if (provider == null)
     {
         throw new ArgumentNullException("provider");
     }
     Provider = provider;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EnvironmentTracker" /> class.
 /// </summary>
 /// <param name="environmentInfoProvider">The environment information provider.</param>
 /// <param name="storage">The storage.</param>
 /// <param name="loggerFactory">The logger factory.</param>
 public EnvironmentTracker(
     IEnvironmentInfoProvider environmentInfoProvider,
     IStorage <EnvironmentInfo> storage,
     ILoggerFactory loggerFactory)
 {
     this.environmentInfoProvider = environmentInfoProvider ?? throw new ArgumentNullException(nameof(environmentInfoProvider));
     this.storage = storage ?? throw new ArgumentNullException(nameof(storage));
     this.logger  = loggerFactory?.CreateLogger <EnvironmentTracker>() ?? throw new ArgumentNullException(nameof(loggerFactory));
 }
 public static void Init(IEnvironmentInfoProvider provider)
 {
     _provider = provider;
 }
Esempio n. 4
0
 public static void Init(IEnvironmentInfoProvider provider)
 {
     _provider = provider;
 }
Esempio n. 5
0
 public AuthService(IUnityContainer container, IEnvironmentInfoProvider environmentInfoProvider)
 {
     _container = container;
     _environmentInfoProvider = environmentInfoProvider;
 }
Esempio n. 6
0
 public AuthService(IUnityContainer container, IEnvironmentInfoProvider environmentInfoProvider)
 {
     _container = container;
     _environmentInfoProvider = environmentInfoProvider;
 }
Esempio n. 7
0
 public QuoteRetriever(IEnvironmentInfoProvider environmentInfoProvider, IFileDataProvider fileDataProvider)
 {
     _environmentInfoProvider = environmentInfoProvider;
     _fileDataProvider = fileDataProvider;
 }
Esempio n. 8
0
 public YammerDatabase(IEnvironmentInfoProvider environmentInfoProvider)
 {
     _environmentInfoProvider = environmentInfoProvider;
     _context = new YammerBotContext();
     _context.Database.Connection.ConnectionString = @"Server=(localdb)\v11.0;Integrated Security=true;AttachDbFileName=" + _environmentInfoProvider.DataDirectory + @"\Data.mdf;Database=YammerBotData";
 }
Esempio n. 9
0
 /// <summary>
 /// Sets the provider to the default one
 /// </summary>
 public static void Reset()
 {
     Provider = new DefaultEnvironmentInfoProvider();
 }
Esempio n. 10
0
 /// <summary>
 /// Sets the current provider to the specified one.
 /// </summary>
 /// <param name="provider">Environment information provider instance</param>
 public static void Configure(IEnvironmentInfoProvider provider)
 {
     if (provider == null) throw new ArgumentNullException("provider");
     Provider = provider;
 }