Skip to content

Commit ba7a76a

Browse files
authored
Fix build warnings (#534)
* Few build warnings fixed.
1 parent d5768dc commit ba7a76a

File tree

147 files changed

+580
-643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+580
-643
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
namespace BlazorBootstrap.Demo.RCL.Models;
22

3-
public record Customer(int CustomerId, string CustomerName);
3+
public record Customer(int CustomerId, string? CustomerName);

BlazorBootstrap.Demo.RCL/Models/Customer2.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
public record Customer2
44
(
55
int CustomerId,
6-
string CustomerName,
7-
string Phone,
8-
string Email,
9-
string Address,
10-
string PostalZip,
11-
string Country
6+
string? CustomerName,
7+
string? Phone,
8+
string? Email,
9+
string? Address,
10+
string? PostalZip,
11+
string? Country
1212
);

BlazorBootstrap.Demo.RCL/Models/Department.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
public class Department
44
{
5-
public string Name { get; set; }
5+
public string? Name { get; set; }
66
public List<Employee1> Employees { get; set; }
77

88
public Department(string name, List<Employee1> employees)

BlazorBootstrap.Demo.RCL/Models/Employee.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
public class Employee
44
{
55
public int Id { get; set; }
6-
public string FirstName { get; set; }
7-
public string LastName { get; set; }
8-
public string Designation { get; set; }
6+
public string? FirstName { get; set; }
7+
public string? LastName { get; set; }
8+
public string? Designation { get; set; }
99
public decimal Salary { get; set; }
1010
public DateTime DOJ { get; set; }
1111
public bool IsActive { get; set; }

BlazorBootstrap.Demo.RCL/Models/Employee1.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public record class Employee1
44
{
55
public int Id { get; set; }
6-
public string Name { get; set; }
7-
public string Designation { get; set; }
6+
public string? Name { get; set; }
7+
public string? Designation { get; set; }
88
public DateOnly DOJ { get; set; }
99
public bool IsActive { get; set; }
1010
}

BlazorBootstrap.Demo.RCL/Models/Employee2.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public record class Employee2
44
{
55
public int Id { get; init; }
6-
public string Name { get; init; }
7-
public string Designation { get; init; }
6+
public string? Name { get; init; }
7+
public string? Designation { get; init; }
88
public decimal Salary { get; init; }
99
public bool IsActive { get; init; }
1010
}

BlazorBootstrap.Demo.RCL/Models/Employee3.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
public record class Employee3
44
{
55
public int Id { get; init; }
6-
public string FirstName { get; init; }
7-
public string LastName { get; init; }
8-
public string Email { get; set; }
9-
public string Company { get; set; }
10-
public string Designation { get; init; }
6+
public string? FirstName { get; init; }
7+
public string? LastName { get; init; }
8+
public string? Email { get; set; }
9+
public string? Company { get; set; }
10+
public string? Designation { get; init; }
1111
public DateOnly DOJ { get; init; }
1212
public decimal Salary { get; init; }
1313
public bool IsActive { get; init; }

BlazorBootstrap.Demo.RCL/Models/Employee4.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public record class Employee4
44
{
55
public int? Id { get; set; }
6-
public string Name { get; set; }
7-
public string Designation { get; set; }
6+
public string? Name { get; set; }
7+
public string? Designation { get; set; }
88
public DateOnly? DOJ { get; set; }
99
public bool IsActive { get; set; }
1010
}

BlazorBootstrap.Demo.RCL/Pages/Alerts/Alert_Demo_04_Dismissing_B.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
</Alert>
44

55
@code {
6-
Alert warningAlert;
7-
private async Task CloseAlert() => await warningAlert?.CloseAsync();
8-
}
6+
Alert warningAlert = default!;
7+
private async Task CloseAlert() => await warningAlert.CloseAsync();
8+
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
<Breadcrumb Items="NavItems1" />
2-
<Breadcrumb Items="NavItems2" />
1+
<Breadcrumb Items="navItems1" />
2+
<Breadcrumb Items="navItems2" />
33

44
@code {
5-
private List<BreadcrumbItem> NavItems1 { get; set; }
6-
private List<BreadcrumbItem> NavItems2 { get; set; }
5+
private List<BreadcrumbItem>? navItems1;
6+
private List<BreadcrumbItem>? navItems2;
77

88
protected override void OnInitialized()
99
{
10-
NavItems1 = new List<BreadcrumbItem>
10+
navItems1 = new List<BreadcrumbItem>
1111
{
1212
new BreadcrumbItem{ Text = "Home", Href ="/" },
1313
new BreadcrumbItem{ Text = "Breadcrumb", IsCurrentPage = true }
1414
};
1515

16-
NavItems2 = new List<BreadcrumbItem>
16+
navItems2 = new List<BreadcrumbItem>
1717
{
1818
new BreadcrumbItem{ Text = "Home", Href ="/" },
1919
new BreadcrumbItem{ Text = "Docs", Href ="/docs" },
2020
new BreadcrumbItem{ Text = "Breadcrumb", IsCurrentPage = true }
2121
};
2222
}
23-
}
23+
}

0 commit comments

Comments
 (0)