Skip to content

Commit e3fcb95

Browse files
committed
рефакторинг
1 parent e5ff593 commit e3fcb95

File tree

1 file changed

+7
-37
lines changed

1 file changed

+7
-37
lines changed

src/OneScript.StandardLibrary/Collections/ValueList/ValueListItem.cs

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -28,53 +28,23 @@ public ValueListItem()
2828
}
2929

3030
[ContextProperty("Значение", "Value")]
31-
public IValue Value
32-
{
33-
get;
34-
set;
35-
}
31+
public IValue Value { get; set; }
3632

3733
[ContextProperty("Представление", "Presentation")]
3834
public string Presentation
3935
{
40-
get
41-
{
42-
return _presentationHolder;
43-
}
44-
set
45-
{
46-
if (value == null)
47-
_presentationHolder = String.Empty;
48-
else
49-
_presentationHolder = value;
50-
}
36+
get => _presentationHolder;
37+
set => _presentationHolder = value ?? String.Empty;
5138
}
5239

5340
[ContextProperty("Пометка", "Check")]
54-
public bool Check
55-
{
56-
get;
57-
set;
58-
}
41+
public bool Check { get; set; }
5942

6043
[ContextProperty("Картинка", "Picture")]
6144
public IValue Picture
62-
{
63-
get
64-
{
65-
return _pictureHolder;
66-
}
67-
set
68-
{
69-
if(value != null)
70-
{
71-
_pictureHolder = value;
72-
}
73-
else
74-
{
75-
_pictureHolder = ValueFactory.Create();
76-
}
77-
}
45+
{
46+
get => _pictureHolder;
47+
set => _pictureHolder = value ?? ValueFactory.Create();
7848
}
7949

8050
public override string ToString()

0 commit comments

Comments
 (0)