/// <summary> /// Initializes a new instance of the <see cref="LocationDialog"/> class. /// </summary> /// <param name="locationDialogFactory">The location dialog factory service.</param> /// <param name="resourceManager">The location resource manager.</param> internal LocationDialog( ILocationDialogFactory locationDialogFactory, IFavoritesManager favoritesManager, LocationResourceManager resourceManager = null) : base(resourceManager) { SetField.NotNull(out this.locationDialogFactory, nameof(locationDialogFactory), locationDialogFactory); SetField.NotNull(out this.favoritesManager, nameof(favoritesManager), favoritesManager); }
/// <summary> /// Initializes a new instance of the <see cref="LocationCardBuilder"/> class. /// </summary> /// <param name="apiKey">The geo spatial API key.</param> public LocationCardBuilder(string apiKey, LocationResourceManager resourceManager) { SetField.NotNull(out this.apiKey, nameof(apiKey), apiKey); SetField.NotNull(out this.resourceManager, nameof(resourceManager), resourceManager); if (!string.IsNullOrEmpty(this.apiKey) && this.apiKey.Length > 60) { useAzureMaps = false; } }
/// <summary> /// Initializes a new instance of the <see cref="LocationDialog"/> class. /// </summary> /// <param name="apiKey">The geo spatial API key.</param> /// <param name="channelId">The channel identifier.</param> /// <param name="prompt">The prompt posted to the user when dialog starts.</param> /// <param name="options">The location options used to customize the experience.</param> /// <param name="requiredFields">The location required fields.</param> /// <param name="resourceManager">The location resource manager.</param> public LocationDialog( string apiKey, string channelId, string prompt, LocationOptions options = LocationOptions.None, LocationRequiredFields requiredFields = LocationRequiredFields.None, LocationResourceManager resourceManager = null) : this(apiKey, channelId, prompt, new BingGeoSpatialService(), options, requiredFields, resourceManager) { }
/// <summary> /// Initializes a new instance of the <see cref="LocationDialog"/> class. /// </summary> /// <param name="apiKey">The geo spatial API key.</param> /// <param name="channelId">The channel identifier.</param> /// <param name="prompt">The prompt posted to the user when dialog starts.</param> /// <param name="options">The location options used to customize the experience.</param> /// <param name="requiredFields">The location required fields.</param> /// <param name="resourceManager">The location resource manager.</param> public LocationDialog( string apiKey, string channelId, string prompt, LocationOptions options = LocationOptions.None, LocationRequiredFields requiredFields = LocationRequiredFields.None, LocationResourceManager resourceManager = null) : this(new LocationDialogFactory(apiKey, channelId, prompt, new GoogleGeocodingService(apiKey), options, requiredFields, resourceManager), new FavoritesManager(), resourceManager) { this.options = options; }
/// <summary> /// Initializes a new instance of the <see cref="LocationDialog"/> class. /// </summary> /// <param name="apiKey">The geo spatial API key.</param> /// <param name="channelId">The channel identifier.</param> /// <param name="prompt">The prompt posted to the user when dialog starts.</param> /// <param name="options">The location options used to customize the experience.</param> /// <param name="requiredFields">The location required fields.</param> /// <param name="resourceManager">The location resource manager.</param> public LocationDialog( string apiKey, string channelId, string prompt, LocationOptions options = LocationOptions.None, LocationRequiredFields requiredFields = LocationRequiredFields.None, LocationResourceManager resourceManager = null) : this(new LocationDialogFactory(apiKey, channelId, prompt, ((!string.IsNullOrEmpty(apiKey) && apiKey.Length <= 60) ? (IGeoSpatialService) new AzureMapsSpatialService(apiKey) : new BingGeoSpatialService(apiKey)), options, requiredFields, resourceManager), new FavoritesManager(), resourceManager) { this.options = options; }
/// <summary> /// Initializes a new instance of the <see cref="LocationDialog"/> class. /// </summary> /// <param name="apiKey">The geo spatial API key.</param> /// <param name="channelId">The channel identifier.</param> /// <param name="prompt">The prompt posted to the user when dialog starts.</param> /// <param name="options">The location options used to customize the experience.</param> /// <param name="requiredFields">The location required fields.</param> /// <param name="resourceManager">The location resource manager.</param> /// <param name="announceDirectionsToUser">Flag to announce directions for the captured address.</param> /// <param name="destination">The destination address to use for turn by turn directions</param> public LocationDialog( string apiKey, string channelId, string prompt, LocationOptions options = LocationOptions.None, LocationRequiredFields requiredFields = LocationRequiredFields.None, LocationResourceManager resourceManager = null, bool announceDirectionsToUser = false, string destination = "") : this(apiKey, channelId, prompt, new BingGeoSpatialService(), options, requiredFields, resourceManager) { announceDirections = announceDirectionsToUser; addressDestination = destination; }
/// <summary> /// Initializes a new instance of the <see cref="LocationDialog"/> class. /// </summary> /// <param name="apiKey">The geo spatial API key.</param> /// <param name="channelId">The channel identifier.</param> /// <param name="prompt">The prompt posted to the user when dialog starts.</param> /// <param name="geoSpatialService">The geo spatial location service.</param> /// <param name="options">The location options used to customize the experience.</param> /// <param name="requiredFields">The location required fields.</param> /// <param name="resourceManager">The location resource manager.</param> internal LocationDialog( string apiKey, string channelId, string prompt, IGeoSpatialService geoSpatialService, LocationOptions options = LocationOptions.None, LocationRequiredFields requiredFields = LocationRequiredFields.None, LocationResourceManager resourceManager = null) : base(resourceManager) { SetField.NotNull(out this.apiKey, nameof(apiKey), apiKey); SetField.NotNull(out this.prompt, nameof(prompt), prompt); SetField.NotNull(out this.channelId, nameof(channelId), channelId); SetField.NotNull(out this.geoSpatialService, nameof(geoSpatialService), geoSpatialService); this.options = options; this.requiredFields = requiredFields; }
/// <summary> /// Initializes a new instance of the <see cref="LocationCardBuilder"/> class. /// </summary> /// <param name="apiKey">The geo spatial API key.</param> public LocationCardBuilder(string apiKey, LocationResourceManager resourceManager) { SetField.NotNull(out this.apiKey, nameof(apiKey), apiKey); SetField.NotNull(out this.resourceManager, nameof(resourceManager), resourceManager); }