Пример #1
0
        /// <inheritdoc />
        public PushService(ApplicationDbContext context, CarWashConfiguration configuration, TelemetryClient telemetryClient)
        {
            _context         = context;
            _client          = new WebPushClient();
            _telemetryClient = telemetryClient;

            var vapid = configuration.Vapid;

            CheckOrGenerateVapidDetails(vapid.Subject, vapid.PublicKey, vapid.PrivateKey);

            _vapidDetails = new VapidDetails(vapid.Subject, vapid.PublicKey, vapid.PrivateKey);
        }
Пример #2
0
 /// <inheritdoc />
 public CalendarService(CarWashConfiguration configuration, HttpClient httpClient = null)
 {
     _configuration   = configuration;
     _telemetryClient = new TelemetryClient();
     _client          = httpClient ?? new HttpClient();
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WashStartedMessage"/> class.
 /// </summary>
 /// <param name="configuration">CarWash app configuration.</param>
 /// <param name="accessors">The state accessors for managing bot state.</param>
 /// <param name="adapterIntegration">The <see cref="BotFrameworkAdapter"/> connects the bot to the service endpoint of the given channel.</param>
 /// <param name="env">Provides information about the web hosting environment an application is running in.</param>
 /// <param name="services">External services.</param>
 public WashStartedMessage(CarWashConfiguration configuration, StateAccessors accessors, IAdapterIntegration adapterIntegration, IHostingEnvironment env, BotServices services)
     : base(accessors, adapterIntegration, env, services, configuration.ServiceBusQueues.BotWashStartedQueue, new Dialog[] { AuthDialog.LoginPromptDialog(), new FindReservationDialog() })
 {
 }
Пример #4
0
 /// <inheritdoc />
 public WellKnownController(CarWashConfiguration configuration)
 {
     _configuration = configuration;
 }
Пример #5
0
 /// <inheritdoc />
 public EmailService(CarWashConfiguration configuration)
 {
     // Parse the connection string and return a reference to the storage account.
     _storage = CloudStorageAccount.Parse(configuration.ConnectionStrings.StorageAccount);
 }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CarWashCommentLeftMessage"/> class.
 /// </summary>
 /// <param name="configuration">CarWash app configuration.</param>
 /// <param name="accessors">The state accessors for managing bot state.</param>
 /// <param name="adapterIntegration">The <see cref="BotFrameworkAdapter"/> connects the bot to the service endpoint of the given channel.</param>
 /// <param name="env">Provides information about the web hosting environment an application is running in.</param>
 /// <param name="services">External services.</param>
 /// <param name="telemetryClient">Telemetry client.</param>
 public CarWashCommentLeftMessage(CarWashConfiguration configuration, StateAccessors accessors, IAdapterIntegration adapterIntegration, IHostingEnvironment env, BotServices services, TelemetryClient telemetryClient)
     : base(accessors, adapterIntegration, env, services, configuration.ServiceBusQueues.BotCarWashCommentLeftQueue, new Dialog[] { AuthDialog.LoginPromptDialog(), new FindReservationDialog(telemetryClient) }, telemetryClient)
 {
     _telemetryClient = telemetryClient;
 }
Пример #7
0
 /// <inheritdoc />
 public BotService(CarWashConfiguration configuration, TelemetryClient telemetryClient)
 {
     _configuration   = configuration;
     _telemetryClient = telemetryClient;
 }
Пример #8
0
 /// <inheritdoc />
 public BotService(CarWashConfiguration configuration)
 {
     _configuration   = configuration;
     _telemetryClient = new TelemetryClient();
 }
Пример #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VehicleArrivedMessage"/> class.
 /// </summary>
 /// <param name="configuration">CarWash app configuration.</param>
 /// <param name="accessors">The state accessors for managing bot state.</param>
 /// <param name="adapterIntegration">The <see cref="BotFrameworkAdapter"/> connects the bot to the service endpoint of the given channel.</param>
 /// <param name="env">Provides information about the web hosting environment an application is running in.</param>
 /// <param name="services">External services.</param>
 /// <param name="telemetryClient">Telemetry client.</param>
 public VehicleArrivedMessage(CarWashConfiguration configuration, StateAccessors accessors, IAdapterIntegration adapterIntegration, IHostingEnvironment env, BotServices services, TelemetryClient telemetryClient)
     : base(accessors, adapterIntegration, env, services, configuration.ServiceBusQueues.BotVehicleArrivedNotificationQueue, new Dialog[] { AuthDialog.LoginPromptDialog(), new FindReservationDialog(telemetryClient) }, telemetryClient)
 {
 }