Skip to content

Commit

Permalink
Use init instead of set to encourage people to use SetTitle method
Browse files Browse the repository at this point in the history
  • Loading branch information
zootius authored Mar 18, 2024
1 parent fb46ef1 commit f07c80c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Blazored.Modal/BlazoredModalInstance.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class BlazoredModalInstance : IDisposable

[Parameter, EditorRequired] public RenderFragment Content { get; set; } = default!;
[Parameter, EditorRequired] public ModalOptions Options { get; set; } = default!;
[Parameter] public string? Title { get => _title; set => _title ??= value; }
[Parameter] public string? Title { get => _title; init => _title ??= value; }

Check warning on line 14 in src/Blazored.Modal/BlazoredModalInstance.razor.cs

View workflow job for this annotation

GitHub Actions / Build and test

Component parameter 'Blazored.Modal.BlazoredModalInstance.Title' should be auto property

Check warning on line 14 in src/Blazored.Modal/BlazoredModalInstance.razor.cs

View workflow job for this annotation

GitHub Actions / Build and test

Component parameter 'Blazored.Modal.BlazoredModalInstance.Title' should be auto property
[Parameter] public Guid Id { get; set; }

private string? Position { get; set; }
Expand Down

0 comments on commit f07c80c

Please sign in to comment.