This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var commands = new List<ImageUrlGenerationOptions>(); | |
imageUrlGeneratorMock.Verify(x => x.GetImageUrl(Capture.In(commands, cmd => true))); | |
foreach (ImageUrlGenerationOptions command in commands) | |
{ | |
System.Diagnostics.Debug.WriteLine(command.Height); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imageUrlGeneratorMock | |
.Setup(x => x.GetImageUrl(It.IsAny<ImageUrlGenerationOptions>())) | |
.Returns("/test.png"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imageUrlGeneratorMock | |
.Setup(x => x.GetImageUrl(It.Is<ImageUrlGenerationOptions>(y => y.Height == Height))) | |
.Returns("/test.png"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ApiExplorerSettings(GroupName = "forms")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
builder.Services.ConfigureOptions<ConfigureUmbracoFormsApiSwaggerGenOptions>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Options; | |
using Microsoft.OpenApi.Models; | |
using Swashbuckle.AspNetCore.SwaggerGen; | |
namespace Umbraco.Forms.Web.Configuration | |
{ | |
public class ConfigureUmbracoFormsApiSwaggerGenOptions : IConfigureOptions<SwaggerGenOptions> | |
{ | |
public void Configure(SwaggerGenOptions options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void PopulateGotoPageOnSubmit(Form form, FormDto dto) | |
{ | |
if (form.GoToPageOnSubmit == 0) | |
{ | |
return; | |
} | |
Attempt<Guid> gotToPageKeyAttempt = _entityService.GetKey(form.GoToPageOnSubmit, UmbracoObjectTypes.Document); | |
if (gotToPageKeyAttempt.Success == false) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"gotoPageOnSubmitRoute": { | |
"path": "/contact-us/thanks/", | |
"startItem": { | |
"id": "ca4249ed-2b23-4337-b522-63cabe5587d1", | |
"path": "home" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IApiContentRoute? GotoPageOnSubmitRoute { get; set; } |
NewerOlder