Skip to content

Commit 6a15450

Browse files
committed
Removed explicit defaults
Some properties were being explicitly initialized to their default values. This is unnecessary. This resolves CA1805.
1 parent 8d7f9f1 commit 6a15450

7 files changed

Lines changed: 10 additions & 10 deletions

File tree

OnTopic.Editor.AspNetCore/Components/FilePathViewComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class FilePathViewComponent: ViewComponent {
2828
/*==========================================================================================================================
2929
| PRIVATE VARIABLES
3030
\-------------------------------------------------------------------------------------------------------------------------*/
31-
private Topic? _currentTopic = null;
31+
private Topic? _currentTopic;
3232

3333
/*==========================================================================================================================
3434
| CONSTRUCTOR

OnTopic.Editor.AspNetCore/Controllers/EditorController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class EditorController : Controller {
4242
\-------------------------------------------------------------------------------------------------------------------------*/
4343
private readonly ITopicRepository _topicRepository;
4444
private readonly ITopicMappingService _topicMappingService;
45-
private Topic _currentTopic = null;
45+
private Topic _currentTopic;
4646

4747
/*==========================================================================================================================
4848
| CONSTRUCTOR

OnTopic.Editor.Models/Components/ViewModels/DateTimeAttributeViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public class DateTimeAttributeViewModel: AttributeViewModel<DateTimeAttributeTop
2121
/*==========================================================================================================================
2222
| PRIVATE VARIABLES
2323
\-------------------------------------------------------------------------------------------------------------------------*/
24-
private string _defaultDate = null;
25-
private string _defaultTime = null;
24+
private string _defaultDate;
25+
private string _defaultTime;
2626

2727
/*==========================================================================================================================
2828
| CONSTRUCTOR

OnTopic.Editor.Models/EditorViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ public class EditorViewModel {
3939
/// <summary>
4040
/// Determines whether or not the page should be rendered as a modal (e.g., including the chrome or not).
4141
/// </summary>
42-
public bool IsModal { get; set; } = false;
42+
public bool IsModal { get; set; }
4343

4444
/*==========================================================================================================================
4545
| IS NEW?
4646
\-------------------------------------------------------------------------------------------------------------------------*/
4747
/// <summary>
4848
/// Determines whether or not the page is being newly created.
4949
/// </summary>
50-
public bool IsNew { get; set; } = false;
50+
public bool IsNew { get; set; }
5151

5252
} // Class
5353
} // Namespace

OnTopic.Editor.Models/Metadata/NumberAttributeTopicViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class NumberAttributeTopicViewModel: AttributeDescriptorTopicViewModel {
2323
/// <summary>
2424
/// Determines the lower bound for acceptable values. Defaults to 0.
2525
/// </summary>
26-
public int MinimumValue { get; set; } = 0;
26+
public int MinimumValue { get; set; }
2727

2828
/*==========================================================================================================================
2929
| PROPERTY: MAXIMUM VALUE

OnTopic.Editor.Models/Queryable/TopicQueryOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public class TopicQueryOptions {
1818
/*==========================================================================================================================
1919
| PRIVATE VARIABLES
2020
\-------------------------------------------------------------------------------------------------------------------------*/
21-
bool _markRelated = false;
21+
bool _markRelated;
2222
bool _expandRelated = true;
23-
bool _showCheckboxes = false;
23+
bool _showCheckboxes;
2424

2525
/*==========================================================================================================================
2626
| CONSTRUCTOR

OnTopic.Editor.Models/Transfer/ImportViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class ImportViewModel: EditorViewModel {
2929
/// <summary>
3030
/// The <see cref="IsImported"/> property is set after the file is successfully imported.
3131
/// </summary>
32-
public bool IsImported { get; set; } = false;
32+
public bool IsImported { get; set; }
3333

3434
} // Class
3535
} // Namespace

0 commit comments

Comments
 (0)