@@ -19,7 +19,7 @@ public class ImagePickerItem {
19
19
/// Gets a reference to the <see cref="JObject"/> the item was parsed from.
20
20
/// </summary>
21
21
[ JsonIgnore ]
22
- public JObject JObject { get ; private set ; }
22
+ public JObject JObject { get ; }
23
23
24
24
/// <summary>
25
25
/// Gets a reference to the selected image.
@@ -31,9 +31,7 @@ public class ImagePickerItem {
31
31
/// Gets whether an image has been selected for this item.
32
32
/// </summary>
33
33
[ JsonIgnore ]
34
- public bool HasImage {
35
- get { return Image != null ; }
36
- }
34
+ public bool HasImage => Image != null ;
37
35
38
36
/// <summary>
39
37
/// Gets the title of this item.
@@ -45,9 +43,7 @@ public bool HasImage {
45
43
/// Gets whether a title has been specified for this item.
46
44
/// </summary>
47
45
[ JsonIgnore ]
48
- public bool HasTitle {
49
- get { return ! String . IsNullOrWhiteSpace ( Title ) ; }
50
- }
46
+ public bool HasTitle => ! String . IsNullOrWhiteSpace ( Title ) ;
51
47
52
48
/// <summary>
53
49
/// Gets the description of this item.
@@ -59,9 +55,7 @@ public bool HasTitle {
59
55
/// Gets whether a description has been specified for this item.
60
56
/// </summary>
61
57
[ JsonIgnore ]
62
- public bool HasDescription {
63
- get { return ! String . IsNullOrWhiteSpace ( Description ) ; }
64
- }
58
+ public bool HasDescription => ! String . IsNullOrWhiteSpace ( Description ) ;
65
59
66
60
/// <summary>
67
61
/// Gets a reference to the selected <see cref="LinkPickerItem"/>.
@@ -74,18 +68,14 @@ public bool HasDescription {
74
68
/// Gets whether a valid link has been specified for this item.
75
69
/// </summary>
76
70
[ JsonIgnore ]
77
- public bool HasLink {
78
- get { return Link != null && Link . IsValid ; }
79
- }
71
+ public bool HasLink => Link != null && Link . IsValid ;
80
72
81
73
/// <summary>
82
74
/// Gets whether the item is valid. Since an item can exist without a title, description or link, but must have
83
75
/// an image, this property equals calling <see cref="HasImage"/>.
84
76
/// </summary>
85
77
[ JsonIgnore ]
86
- public bool IsValid {
87
- get { return HasImage ; }
88
- }
78
+ public bool IsValid => HasImage ;
89
79
90
80
#endregion
91
81
@@ -100,7 +90,8 @@ public ImagePickerItem() {
100
90
}
101
91
102
92
/// <summary>
103
- /// Initializes a new image picker item based on the specified <code>image</code>, <code>title</code>, <code>description</code> and <code>link</code>.
93
+ /// Initializes a new image picker item based on the specified <paramref name="image"/>, <paramref name="title"/>,
94
+ /// <paramref name="description"/> and <paramref name="link"/>.
104
95
/// </summary>
105
96
/// <param name="image">An instance of <see cref="IPublishedContent"/> representing the selected image.</param>
106
97
/// <param name="title">The title of the item.</param>
@@ -133,7 +124,7 @@ protected ImagePickerItem(JObject obj) {
133
124
/// Parses the specified <see cref="JObject"/> into an instance of <see cref="ImagePickerItem"/>.
134
125
/// </summary>
135
126
/// <param name="obj">The instance of <see cref="JObject"/> to be parsed.</param>
136
- /// <returns>Returns an instance of <see cref="ImagePickerItem"/>, or <code>null</code> if <code>obj</code> is
127
+ /// <returns>An instance of <see cref="ImagePickerItem"/>, or <code>null</code> if <code>obj</code> is
137
128
/// <code>null</code>.</returns>
138
129
public static ImagePickerItem Parse ( JObject obj ) {
139
130
return obj == null ? null : new ImagePickerItem ( obj ) ;
0 commit comments