Skip to content

Commit b738067

Browse files
committed
refactor: Remove ref for out
1 parent 3dc38d4 commit b738067

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewModel.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,65 +23,65 @@ public sealed class CreateNewModel
2323
public string Title
2424
{
2525
get => title;
26-
set => SetProperty(ref title, value);
26+
set => SetProperty(out title, value);
2727
}
2828

2929
[Required]
3030
public string ShortDescription
3131
{
3232
get => shortDescription;
33-
set => SetProperty(ref shortDescription, value);
33+
set => SetProperty(out shortDescription, value);
3434
}
3535

3636
[Required]
3737
public string Content
3838
{
3939
get => content;
40-
set => SetProperty(ref content, value);
40+
set => SetProperty(out content, value);
4141
}
4242

4343
[Required]
4444
[MaxLength(1024)]
4545
public string PreviewImageUrl
4646
{
4747
get => previewImageUrl;
48-
set => SetProperty(ref previewImageUrl, value);
48+
set => SetProperty(out previewImageUrl, value);
4949
}
5050

5151
[Required]
5252
[PublishedWithScheduledDateValidation]
5353
public bool IsPublished
5454
{
5555
get => isPublished;
56-
set => SetProperty(ref isPublished, value);
56+
set => SetProperty(out isPublished, value);
5757
}
5858

5959
[Required]
6060
public bool ShouldUpdateDate
6161
{
6262
get => shouldUpdateDate;
63-
set => SetProperty(ref shouldUpdateDate, value);
63+
set => SetProperty(out shouldUpdateDate, value);
6464
}
6565

6666
[FutureDateValidation]
6767
public DateTime? ScheduledPublishDate
6868
{
6969
get => scheduledPublishDate;
70-
set => SetProperty(ref scheduledPublishDate, value);
70+
set => SetProperty(out scheduledPublishDate, value);
7171
}
7272

7373
public string Tags
7474
{
7575
get => tags;
76-
set => SetProperty(ref tags, value);
76+
set => SetProperty(out tags, value);
7777
}
7878

7979
[MaxLength(256)]
8080
[FallbackUrlValidation]
8181
public string PreviewImageUrlFallback
8282
{
8383
get => previewImageUrlFallback;
84-
set => SetProperty(ref previewImageUrlFallback, value);
84+
set => SetProperty(out previewImageUrlFallback, value);
8585
}
8686

8787
public bool IsDirty { get; private set; }
@@ -129,7 +129,7 @@ public BlogPost ToBlogPost()
129129
return blogPost;
130130
}
131131

132-
private void SetProperty<T>(ref T backingField, T value)
132+
private void SetProperty<T>(out T backingField, T value)
133133
{
134134
backingField = value;
135135
IsDirty = true;

0 commit comments

Comments
 (0)