public BlobStorageService(IMemoryCache cache, IAppInsightsLoggerService logger) : base(cache, logger) { _logger = logger; _cache = cache; this.blobClient = storageAccount.CreateCloudBlobClient(); this.container = blobClient.GetContainerReference("trained-models"); this.blockBlob = container.GetBlockBlobReference("SentimentAnalysisModel"); }
public ClassifyController(IClassifyService classifyService, IAppInsightsLoggerService logger) { _classifyService = classifyService; _logger = logger; if (_classifyService == null) { throw new ArgumentException("Classify service cannot be null."); } }
public ClassifyService(IMemoryCache cache, IAppInsightsLoggerService logger, IBlobStorageService blobStorage) : base(cache, logger) { _blobService = blobStorage; _logger = logger; if (_blobService == null) { throw new ArgumentException("Blob storage service cannot be null."); } }
public BaseService(IMemoryCache cache, IAppInsightsLoggerService logger) { _cache = cache; _logger = logger; this.cacheOptions = new MemoryCacheEntryOptions() .SetSlidingExpiration(TimeSpan.FromMinutes(5)); if (_cache == null) { throw new ArgumentNullException("Caching service is null"); } }