public void TestInitialize() { _storageService = Substitute.For <IStorageService>(); _cognitiveService = Substitute.For <ICognitiveService>(); _hangoutsChatConnector = Substitute.For <IHangoutsChatConnector>(); _timesheetService = new TimesheetService(_storageService, _cognitiveService, _hangoutsChatConnector); }
public static async Task Run([BlobTrigger("spitball-user/profile/{id}/{filename}.{extension}")] CloudBlockBlob myBlob, string id, [Inject] ICognitiveService cognitiveService, ILogger log) { await myBlob.FetchAttributesAsync(); if (myBlob.Metadata.TryGetValue("face", out _)) { return; } log.LogInformation($"Processing {id}"); await using var sr = await myBlob.OpenReadAsync(); var result = await cognitiveService.DetectCenterFaceAsync(sr); if (result is null) { return; } myBlob.Metadata["face"] = $"{result.Value.X},{result.Value.Y}"; await myBlob.SetMetadataAsync(); log.LogInformation($"Finish Processing {id}"); }
public void TestInitialize() { _cognitiveService = Substitute.For <ICognitiveService>(); _asyncResponder = Substitute.For <IAsyncResponder>(); _logger = Substitute.For <ILogger <HangoutsChatService> >(); _service = new HangoutsChatService(_cognitiveService, _asyncResponder, _logger); }
/// <summary>Initializes a new instance of the <see cref="HangoutsChatService"/> class.</summary> public HangoutsChatService( ICognitiveService cognitiveService, IAsyncResponder responder, ILogger <HangoutsChatService> logger) { _cognitiveService = cognitiveService; _responder = responder; _logger = logger; }
/// <summary>Initializes a new instance of the <see cref="TimesheetService"/> class.</summary> public TimesheetService( IStorageService storageService, ICognitiveService cognitiveService, IHangoutsChatConnector hangoutsChatConnector) { _storageService = storageService; _cognitiveService = cognitiveService; _hangoutsChatConnector = hangoutsChatConnector; }
public ImagesController(ICognitiveService cognitiveService, IStorageService storageService, IMapper mapper, IImageRecognitionRepository imageRecognitionRepository, ILoggerService loggerService) : base(mapper, loggerService) { _cognitiveService = cognitiveService; _storageService = storageService; _imageRecognitionRepository = imageRecognitionRepository; }
public AppController(IAktuelPageService aktuelPageService, IAktuelService aktuelService, ICompanyService companyService, IQueueService queueService, ICrawlerService crawlerService, IUploadService uploadService, ICognitiveService cognitiveService) { this.aktuelPageService = aktuelPageService; this.aktuelService = aktuelService; this.companyService = companyService; this.queueService = queueService; this.crawlerService = crawlerService; this.uploadService = uploadService; this.cognitiveService = cognitiveService; }
public TextController(ICognitiveService cognitiveService) { _cognitiveService = cognitiveService; }
public static async Task <ICognitiveService> SpeakAsync(this ICognitiveService service, Voice voice, string text) { await service.TextToSpeech(voice, text, TtsAudios.Wav.Riff16khz16bitMonoPcm).PlayWavAsync(); return(service); }
public static Task <ICognitiveService> SpeakPolishAsync(this ICognitiveService service, string text) => service.SpeakAsync(TtsVoices.Standard.pl_PL_PaulinaRUS, text);
public static Task <ICognitiveService> SpeakEnglishWomanAsync(this ICognitiveService service, string text) => service.SpeakAsync(TtsVoices.Natural.en_US_JessaNeural, text);
/// <summary> /// Initializes a new instance of the <see cref="DashboardFunction"/> class. /// </summary> /// <param name="schoolService">The schoolService<see cref="ISchoolService"/>.</param> /// <param name="studentService">The studentService<see cref="IStudentService"/>.</param> /// <param name="cognitiveService">The cognitiveService<see cref="ICognitiveService"/>.</param> public DashboardFunction(ISchoolService schoolService, IStudentService studentService, ICognitiveService cognitiveService) { _schoolService = schoolService; _studentService = studentService; _cognitiveService = cognitiveService; }
public MainViewModel(IMvxNavigationService navigationService, IMySeriesDataService dataService, IAudioRecorderService recorderService, ICognitiveService cognitiveService) { this.navigationService = navigationService; this.exploreViewModel = new ExploreViewModel(navigationService, dataService); this.upcomingViewModel = new UpcomingViewModel(dataService); this.profileViewModel = new ProfileViewModel(recorderService, cognitiveService); }
public AssetIngestionController(ICognitiveService cognitiveService) { _cognitiveService = cognitiveService; }
public HomeController(ICognitiveService cognitiveService) => _cognitiveService = cognitiveService;
public HomeController(IStorageService storageService, ICognitiveService cognitiveService) { _storageService = storageService; _cognitiveService = cognitiveService; }
public PhotoController(ICognitiveService cognitiveService) { _cognitiveService = cognitiveService; }
/// <summary>Initializes a new instance of the <see cref="HangoutsChatService"/> class.</summary> public HangoutsChatService(ICognitiveService cognitiveService, IAsyncResponder responder) { _cognitiveService = cognitiveService; _responder = responder; }
/// <summary> /// Initializes a new instance of the <see cref="CognitiveServiceFunction"/> class. /// </summary> /// <param name="cognitiveService">The cognitiveService<see cref="ICognitiveService"/>.</param> public CognitiveServiceFunction(ICognitiveService cognitiveService) { _cognitiveService = cognitiveService; }