Warning fix

This commit is contained in:
luosheng
2023-02-18 08:52:21 +08:00
parent 5118fc5ac3
commit d99cad0d77
23 changed files with 283 additions and 93 deletions

View File

@@ -16,7 +16,7 @@ namespace CrossLamp.Controllers
_logger = logger;
}
private static BaseUtility _utility;
private static BaseUtility? _utility = null;
public ActionResult Index()
{
@@ -24,7 +24,7 @@ namespace CrossLamp.Controllers
}
[HttpGet]
public async Task<JsonResult> GetLamp()
public async Task<JsonResult?> GetLamp()
{
try
{

View File

@@ -8,9 +8,9 @@ namespace CrossLampControl.WebApi.Models
{
public class Lamp
{
public string MainLamp { get; set; }
public string SubLamp { get; set; }
public string StartPause { get; set; }
public string? MainLamp { get; set; }
public string? SubLamp { get; set; }
public string? StartPause { get; set; }
public Lamp()
{