Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1bd1278
chore: update Ivy package reference to version 1.2.17 and fix variant…
ArtemLazarchuk Mar 7, 2026
4b832d2
chore: update Ivy package reference to version 1.2.17 and fix variant…
ArtemLazarchuk Mar 7, 2026
74c0160
chore: update Ivy package reference to version 1.2.17 and modify even…
ArtemLazarchuk Mar 7, 2026
587a6db
chore: update Ivy package reference to version 1.2.17 and modify even…
ArtemLazarchuk Mar 7, 2026
8fd5826
chore: update Ivy package reference to version 1.2.17 and modify text…
ArtemLazarchuk Mar 7, 2026
570eede
chore: update Ivy package reference to version 1.2.17 and fix variant…
ArtemLazarchuk Mar 7, 2026
8c1b02d
chore: update Ivy package reference to version 1.2.17 and refactor bu…
ArtemLazarchuk Mar 7, 2026
0d36204
chore: update Ivy package reference to version 1.2.17 and refactor bu…
ArtemLazarchuk Mar 7, 2026
6a03963
chore: update Ivy package reference to version 1.2.17 and refactor bu…
ArtemLazarchuk Mar 7, 2026
658c64a
chore: update Ivy package reference to version 1.2.17 and refactor bu…
ArtemLazarchuk Mar 7, 2026
0445d2f
chore: update Ivy package reference to version 1.2.17 and fix variant…
ArtemLazarchuk Mar 7, 2026
810040f
chore: update Ivy package reference to version 1.2.17 and fix variant…
ArtemLazarchuk Mar 7, 2026
7ebf870
chore: update Ivy package reference to version 1.2.17 and fix variant…
ArtemLazarchuk Mar 7, 2026
4a0546c
chore: update Ivy package reference to version 1.2.17 and refactor bu…
ArtemLazarchuk Mar 7, 2026
653be2c
chore: update Ivy package reference to version 1.2.17 and modify text…
ArtemLazarchuk Mar 7, 2026
35356ff
chore: update Ivy package reference to version 1.2.17 and adjust text…
ArtemLazarchuk Mar 7, 2026
f1a3278
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
5ca4183
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
2ee802e
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
eb75a23
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
e1ec22f
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
9fc957f
chore: update Ivy package reference to version 1.2.17 and fix variant…
ArtemLazarchuk Mar 7, 2026
0405fa2
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
0c0d7a1
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
30a621e
chore: update Microsoft.SemanticKernel package reference to version 1…
ArtemLazarchuk Mar 7, 2026
b516e35
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
6bf66ea
chore: update Ivy package reference to version 1.2.17 in SharpYamlExa…
ArtemLazarchuk Mar 7, 2026
7524755
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
72a827a
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
f4e46e7
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
ba6d2b6
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
fdb899a
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
194dd48
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
7f50ad1
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
dfc35a2
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
6b05544
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
3fd0870
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
eac10b7
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
1dbaf78
chore: update Magick.NET package reference to version 14.10.3 and sta…
ArtemLazarchuk Mar 7, 2026
ef0a277
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
5acaf0a
chore: update Ivy package reference to version 1.2.17 and standardize…
ArtemLazarchuk Mar 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages-demos/HtmlAgilityPack/Apps/HtmlAgilityPack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public class HtmlAgilityPackApp : ViewBase
| Text.Muted("HTML parser extracts website data: title, images, structure, links, and social media info")
| urlState.ToSearchInput().WithLabel("Enter Site URL:")
| dataTypesSelect.ToSelectInput(dataTypeOptions)
.Variant(SelectInputs.Toggle)
.Variant(SelectInputVariants.Toggle)
.WithLabel("Select data to extract:")
| new Button("Parse Site HTML", eventHandler).Loading(parsingState.Value)
| (errorState.Value.Length > 0 ? Text.Block(errorState.Value) : null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.12.4" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>
<ItemGroup>
<Folder Include="Apps" />
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/aspose-barcode/Apps/BarcodeApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private static byte[] GeneratePngBytes(string text, SymbologyEncodeType encodeTy
| typeDropDown
| sizeDropDown
| new Button("Preview").Primary().Icon(Icons.Eye)
.HandleClick(() =>
.OnClick(() =>
{
if (string.IsNullOrWhiteSpace(text.Value))
{
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/aspose-barcode/AsposeBarCodeExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


<ItemGroup>
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
<PackageReference Include="Aspose.BarCode" Version="25.11.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion packages-demos/aspose-ocr/Apps/ImageToTextApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class ImageToTextApp : ViewBase
| (error.Value != null ? new Callout(error.Value, variant: CalloutVariant.Error) : null)
| uploadedFile.ToFileInput(upload).Placeholder("Upload Image")
| new Button("Recognize").Primary().Icon(Icons.Eye)
.HandleClick(() =>
.OnClick(() =>
{
if (error.Value == null && uploadedFile.Value != null)
{
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/aspose-ocr/AsposeOcrExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="Aspose.OCR" Version="25.11.0" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion packages-demos/aspose-words/Apps/TextGeneratorApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class TextGeneratorApp : ViewBase
Layout.Vertical().Gap(3).Padding(2)
| Text.H2("Text to DOCX")
| Text.Block("Enter your text below and generate a Word document instantly.")
| inputText.ToTextAreaInput(placeholder: "Type your text here...").Height(Size.Units(35))
| inputText.ToTextareaInput(placeholder: "Type your text here...").Height(Size.Units(35))
| new Spacer()
| (generatedDoc.Value == null && !isGenerating.Value
? new Button("Generate Document", _ =>
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/aspose-words/AsposeWordsExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Aspose.Words" Version="25.12.0" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>
<ItemGroup>
<Folder Include="Apps" />
Expand Down
4 changes: 2 additions & 2 deletions packages-demos/barcodelib/Apps/BarcodeLibApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ private static readonly (string Label, Type Type)[] Symbologies =
| typeDropDown
| new Button(includeLabel.Value ? "Label: ON" : "Label: OFF")
.Primary()
.HandleClick(() => includeLabel.Value = !includeLabel.Value)
.OnClick(() => includeLabel.Value = !includeLabel.Value)
| new Button("Preview").Primary().Icon(Icons.Eye)
.HandleClick(() =>
.OnClick(() =>
{
if (string.IsNullOrWhiteSpace(text.Value))
{
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/barcodelib/BarcodelibExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
<PackageReference Include="BarcodeLib" Version="3.1.5" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion packages-demos/closedxml/Apps/WorkbooksEditorApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public class WorksheetEditor(DataTable table, string fileName, IBladeService bla
Layout.Vertical().Gap(2)
| Layout.Horizontal().Gap(2)
| columnName.ToTextInput(placeholder: "Column name")
| selectedType.ToSelectInput(columnTypes.ToOptions()).Variant(SelectInputs.Select)
| selectedType.ToSelectInput(columnTypes.ToOptions()).Variant(SelectInputVariants.Select)
| addColumnButton
).Title($"Add New Column");

Expand Down
2 changes: 1 addition & 1 deletion packages-demos/closedxml/ClosedXmlExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="ClosedXML" Version="0.105.0" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>
<ItemGroup>
<Folder Include="Apps" />
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/cronos/Apps/CronosApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ string GetDescription(CronScheduleType scheduleType)
.WithLabel("Predefined Examples"),

includeSeconds
.ToBoolInput(variant: BoolInputs.Checkbox)
.ToBoolInput(variant: BoolInputVariants.Checkbox)
.Label("Include seconds"),

new Button("Try parse", onClick: TryParseCron)
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/cronos/CronosExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cronos" Version="0.11.1" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>
<ItemGroup>
<Folder Include="Apps" />
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/csvhelper/Apps/CsvHelperApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public class ProductModel
.Icon(Icons.Plus)
.Primary()
.Width(Size.Full())
.HandleClick(_ => isDialogOpen.Set(true))
.OnClick(_ => isDialogOpen.Set(true))

| product.ToForm()
.Remove(m => m.Id)
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/csvhelper/CsvHelperExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="CsvHelper" Version="33.1.0" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>
<ItemGroup>
<Folder Include="Apps" />
Expand Down
4 changes: 2 additions & 2 deletions packages-demos/diffplex/Apps/DiffPlexApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ void compareDiff()
// Comparison controls
var controls =
Layout.Horizontal().Gap(3)
| ignoreWhitespace.ToBoolInput(variant: BoolInputs.Checkbox).Label("Ignore Whitespace")
| ignoreCase.ToBoolInput(variant: BoolInputs.Checkbox).Label("Ignore Case")
| ignoreWhitespace.ToBoolInput(variant: BoolInputVariants.Checkbox).Label("Ignore Whitespace")
| ignoreCase.ToBoolInput(variant: BoolInputVariants.Checkbox).Label("Ignore Case")
| new Button("Compare Texts", onClick: compareDiff).Primary().Icon(Icons.GitCompare)
| new Button("Clear", onClick: () => diffResult.Value = null).Variant(ButtonVariant.Secondary).Icon(Icons.X);

Expand Down
2 changes: 1 addition & 1 deletion packages-demos/diffplex/DiffPlexExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="DiffPlex" Version="1.9.0" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>


Expand Down
2 changes: 1 addition & 1 deletion packages-demos/enums-net/Apps/EnumsNetDemoApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ void RunFlagOperation(string operationName)
| new Card(
Layout.Vertical().Gap(2)
| selectedDemo.ToSelectInput(new[] { "Enumeration", "StringFormatting", "FlagOperations", "Parsing" }.ToOptions())
.Variant(SelectInputs.Toggle)
.Variant(SelectInputVariants.Toggle)
| validationResult.Value)
);

Expand Down
2 changes: 1 addition & 1 deletion packages-demos/enums-net/EnumsNetExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="Enums.NET" Version="5.0.0" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>


Expand Down
10 changes: 5 additions & 5 deletions packages-demos/epplus/Apps/EPPlusApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,23 @@ private static void EnsureExcelFileExists(string filePath)
? new Button("Delete All Records")
.Destructive()
.Icon(Icons.Trash)
.HandleClick(_ => HandleDeleteAsync(booksState, filePath, client))
.OnClick(_ => HandleDeleteAsync(booksState, filePath, client))
: new Button("Delete All Records")
.Secondary()
.Icon(Icons.Trash)
.HandleClick(_ => HandleDeleteAsync(booksState, filePath, client))
.OnClick(_ => HandleDeleteAsync(booksState, filePath, client))
.Disabled();

var generateBtn = hasBooks
? new Button("Generate Excel")
.Secondary()
.Icon(Icons.FileText)
.HandleClick(_ => ExcelManipulation.WriteExcel(booksState))
.OnClick(_ => ExcelManipulation.WriteExcel(booksState))
.Disabled()
: new Button("Generate Excel")
.Primary()
.Icon(Icons.FileText)
.HandleClick(_ => ExcelManipulation.WriteExcel(booksState));
.OnClick(_ => ExcelManipulation.WriteExcel(booksState));

var book = UseState(() => new Book());
var formBuilder = book.ToForm().Remove(x => x.ID)
Expand Down Expand Up @@ -112,7 +112,7 @@ private static void EnsureExcelFileExists(string filePath)
| new Button("Add Book")
.Primary()
.Icon(Icons.Plus)
.HandleClick(async _ => await HandleSubmitAsync(booksState, client, book, onSubmit))
.OnClick(async _ => await HandleSubmitAsync(booksState, client, book, onSubmit))
.Loading(loading)
.Disabled(loading)
| validationView
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/epplus/EPPlusExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EPPlus" Version="8.4.0" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>


Expand Down
2 changes: 1 addition & 1 deletion packages-demos/fastmember/Apps/FastMemberApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ private static object BuildBenchmarkTab(Action<BenchmarkResults?> showBenchmark,
| Text.H3("Performance Benchmark")
| Text.Muted("Compare FastMember performance with standard .NET Reflection API, Dynamic C#, and PropertyDescriptor")
| new Button(benchmarkResultState.Value == null ? "Run Benchmark" : "Run Benchmark Again")
.HandleClick(_ => showBenchmark(runBenchmark())).Icon(Icons.Zap).Primary());
.OnClick(_ => showBenchmark(runBenchmark())).Icon(Icons.Zap).Primary());

if (benchmarkResultState.Value == null)
return buttonCard;
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/fastmember/FastMemberExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ItemGroup>
<PackageReference Include="FastMember" Version="1.5.0" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions packages-demos/fluentdatetime/Apps/FluentDateTimeApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ public class FluentDateTimeApp : ViewBase
| Layout.Vertical()
| Text.Label("Base Date & Time")
| baseDateTime.ToDateTimeInput()
.Variant(DateTimeInputs.DateTime)
.Variant(DateTimeInputVariants.DateTime)
| Text.Label("Operation")
| operation.ToSelectInput(Operations).Variant(SelectInputs.Select)
| operation.ToSelectInput(Operations).Variant(SelectInputVariants.Select)
| Text.Label("Time Unit")
| unit.ToSelectInput(TimeUnits).Variant(SelectInputs.Select)
| unit.ToSelectInput(TimeUnits).Variant(SelectInputVariants.Select)
| Text.Label("Amount")
| new NumberInput<double>(amount)
.Min(1)
.Max(9999)
| (Layout.Horizontal().Gap(4)
| new Button("Calculate")
.HandleClick(() => showResult.Set(true))
.OnClick(() => showResult.Set(true))
| new Button("Clear")
.Secondary()
.HandleClick(() => {
.OnClick(() => {
showResult.Set(false);
operation.Set("Add");
unit.Set("Days");
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/fluentdatetime/FluentDateTimeExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<EmbeddedResource Include="Assets/**/*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
<PackageReference Include="FluentDateTime" Version="3.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/fuzzysharp/Apps/FuzzySharpApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class FuzzySharpApp : ViewBase
| Text.Muted("Intelligent search with typo tolerance")
| new TextInput(searchTerm)
.Placeholder("Try: 'aple', 'bana', 'berry'...")
.Variant(TextInputs.Search)
.Variant(TextInputVariants.Search)
| new Spacer()
| Text.Block("This demo uses the FuzzySharp NuGet package for intelligent text matching.")
| Text.Markdown("Built with [Ivy Framework](https://github.com/Ivy-Interactive/Ivy-Framework) and [FuzzySharp](https://github.com/JakeBayer/FuzzySharp)")
Expand Down
2 changes: 1 addition & 1 deletion packages-demos/fuzzysharp/FuzzySharpExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ItemGroup>
<PackageReference Include="FuzzySharp" Version="2.0.2" />
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Ivy" Version="1.2.17" />
</ItemGroup>


Expand Down
6 changes: 3 additions & 3 deletions packages-demos/magick-net-q16-anycpu/Apps/MagickNetApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public class MagickNetApp : ViewBase
| new NumberInput<int>(widthState)
| Text.Block("Height:")
| new NumberInput<int>(heightState))
| maintainAspectRatio.ToBoolInput(variant: BoolInputs.Checkbox).Label("Maintain aspect ratio")
| maintainAspectRatio.ToBoolInput(variant: BoolInputVariants.Checkbox).Label("Maintain aspect ratio")
: selectedEffect.Value == "blur"
? Layout.Horizontal().Gap(4)
| Text.Block("Blur Radius:")
Expand Down Expand Up @@ -279,8 +279,8 @@ public class MagickNetApp : ViewBase
| new NumberInput<double>(rotation).Min(-360).Max(360).Step(1)
: selectedEffect.Value == "flip"
? Layout.Vertical().Gap(2)
| flipHorizontal.ToBoolInput(variant: BoolInputs.Checkbox).Label("Flip horizontally")
| flipVertical.ToBoolInput(variant: BoolInputs.Checkbox).Label("Flip vertically")
| flipHorizontal.ToBoolInput(variant: BoolInputVariants.Checkbox).Label("Flip horizontally")
| flipVertical.ToBoolInput(variant: BoolInputVariants.Checkbox).Label("Flip vertically")
: Text.Block("No additional parameters needed for this effect."))
// Output format
| Text.H4("Output Format")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -15,8 +15,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Ivy" Version="1.2.16" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="14.10.0" />
<PackageReference Include="Ivy" Version="1.2.17" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="14.10.3" />
</ItemGroup>

</Project>
22 changes: 9 additions & 13 deletions packages-demos/mapster/Apps/MapsterApp.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace MapsterExample
namespace MapsterExample
{
[App(icon: Icons.PersonStanding, title: "Mapster")]
public class MapsterApp : ViewBase
Expand Down Expand Up @@ -41,43 +41,39 @@ public class MapsterApp : ViewBase

// Person -> PersonDto
var toDtoButton = new Button("Person -> PersonDto")
{
OnClick = async (evt) =>
.OnClick(async _ =>
{
try
{
var person = JsonSerializer.Deserialize<Person>(personJsonState.Value);
var dto = person.Adapt<PersonDto>();
dtoJsonState.Value = ToPrettyJson(dto);
dtoJsonState.Set(ToPrettyJson(dto));
}
catch (Exception ex)
{
dtoJsonState.Value = $"{{ \"error\": \"{ex.Message}\" }}";
dtoJsonState.Set($"{{ \"error\": \"{ex.Message}\" }}");
}

await ValueTask.CompletedTask;
}
};
});

// PersonDto -> Person
var toPersonButton = new Button("PersonDto -> Person")
{
OnClick = async (evt) =>
.OnClick(async _ =>
{
try
{
var dto = JsonSerializer.Deserialize<PersonDto>(dtoJsonState.Value);
var person = dto.Adapt<Person>();
personJsonState.Value = ToPrettyJson(person);
personJsonState.Set(ToPrettyJson(person));
}
catch (Exception ex)
{
personJsonState.Value = $"{{ \"error\": \"{ex.Message}\" }}";
personJsonState.Set($"{{ \"error\": \"{ex.Message}\" }}");
}

await ValueTask.CompletedTask;
}
};
});

return Layout.Vertical()
| new Card(
Expand Down
Loading