Use global usings.

This commit is contained in:
2021-12-08 18:13:14 +00:00
parent ba39d5017f
commit 1aa8a3af4b
70 changed files with 12 additions and 285 deletions

View File

@@ -1,14 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Aaru.CommonTypes.Structs.Devices.ATA;
using Aaru.Server.Core;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using Ata = Aaru.CommonTypes.Metadata.Ata;
using TestedMedia = Aaru.CommonTypes.Metadata.TestedMedia;

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,11 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,11 +1,3 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,11 +1,4 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,11 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,15 +1,8 @@
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using Aaru.CommonTypes.Metadata;
using Aaru.Decoders.CD;
using Aaru.Helpers;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -30,9 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,10 +1,4 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,9 +1,4 @@
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,9 +1,4 @@
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,9 +1,4 @@
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,10 +1,4 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,9 +1,4 @@
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,9 +1,4 @@
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,16 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.CommonTypes.Structs.Devices.SCSI;
using Aaru.Helpers;
using Aaru.Server.Core;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using TestedMedia = Aaru.CommonTypes.Metadata.TestedMedia;

View File

@@ -1,11 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,10 +1,4 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,6 +1,3 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using Aaru.CommonTypes.Metadata;
using Aaru.CommonTypes.Structs.Devices.SCSI;
@@ -10,10 +7,6 @@ using Aaru.Decoders.CD;
using Aaru.Decoders.DVD;
using Aaru.Decoders.SCSI;
using Aaru.Helpers;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Cartridge = Aaru.Decoders.Bluray.Cartridge;
using DDS = Aaru.Decoders.Bluray.DDS;
using DMI = Aaru.Decoders.Xbox.DMI;

View File

@@ -1,10 +1,4 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,11 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace Aaru.Server.Areas.Admin.Controllers;

View File

@@ -1,10 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace Aaru.Server.Areas.Admin.Controllers;
[Area("Admin"), Authorize]

View File

@@ -1,5 +1,3 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Aaru.Server.Areas.Identity.Pages.Account;

View File

@@ -3,10 +3,8 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
// -------------------------------------------------------------------------------------------------
using System;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;

View File

@@ -30,16 +30,11 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using Aaru.CommonTypes.Structs.Devices.SCSI;
using Aaru.Decoders.PCMCIA;
using Aaru.Decoders.SCSI;
using Aaru.Helpers;
using Aaru.Server.Core;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using Ata = Aaru.CommonTypes.Metadata.Ata;
using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;

View File

@@ -30,10 +30,7 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Xml;
@@ -41,9 +38,7 @@ using System.Xml.Serialization;
using Aaru.CommonTypes.Interop;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Core;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using OperatingSystem = Aaru.Server.Models.OperatingSystem;
using PlatformID = Aaru.CommonTypes.Interop.PlatformID;
using Version = Aaru.Server.Models.Version;

View File

@@ -30,17 +30,11 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using Aaru.CommonTypes.Metadata;
using Aaru.Dto;
using Aaru.Helpers;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace Aaru.Server.Controllers;

View File

@@ -30,21 +30,16 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using Cinchoo.PGP;
using MailKit.Net.Smtp;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MimeKit;
using Newtonsoft.Json;

View File

@@ -30,18 +30,13 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Xml.Serialization;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Core;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using OperatingSystem = Aaru.Server.Models.OperatingSystem;
using Version = Aaru.Server.Models.Version;

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using Aaru.CommonTypes.Structs.Devices.ATA;
using Aaru.CommonTypes.Structs.Devices.SCSI;

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using Aaru.CommonTypes.Metadata;
using Aaru.Decoders.SCSI;

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using Aaru.CommonTypes.Structs.Devices.SCSI;
namespace Aaru.Server.Core;

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using Aaru.CommonTypes.Metadata;
using Aaru.CommonTypes.Structs.Devices.SCSI;

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Linq;
using Aaru.CommonTypes.Structs.Devices.SCSI.Modes;
namespace Aaru.Server.Core;

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using Aaru.CommonTypes.Metadata;
using Aaru.CommonTypes.Structs.Devices.SCSI;
using Aaru.Decoders.SCSI;

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using Aaru.CommonTypes.Metadata;
namespace Aaru.Server.Core;

View File

@@ -30,9 +30,8 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System.Linq;
using Aaru.CommonTypes.Metadata;
using Aaru.Server.Models;
using OperatingSystem = Aaru.Server.Models.OperatingSystem;
using Version = Aaru.Server.Models.Version;
namespace Aaru.Server.Core;

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
namespace Aaru.Server.Core;
public static class TestedMedia

10
Aaru.Server/Globals.cs Normal file
View File

@@ -0,0 +1,10 @@
global using System;
global using Aaru.Server.Models;
global using System.Collections.Generic;
global using System.Linq;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.EntityFrameworkCore;
global using System.Threading.Tasks;

View File

@@ -1,5 +1,4 @@
using System;
using Aaru.Server.Models;
using Aaru.Server.Models;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Aaru.CommonTypes.Metadata;

View File

@@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace Aaru.Server.Models;
public class ChsModel

View File

@@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace Aaru.Server.Models;
public class CompareModel

View File

@@ -34,7 +34,6 @@ using System.Data.Common;
using Aaru.CommonTypes.Metadata;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
namespace Aaru.Server.Models;

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.ComponentModel;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Metadata;

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Aaru.CommonTypes.Metadata;
namespace Aaru.Server.Models;

View File

@@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace Aaru.Server.Models;
public class FindReportModel : BaseModel<int>

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

View File

@@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace Aaru.Server.Models;
public class IdHashModelForView

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using Aaru.CommonTypes;

View File

@@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace Aaru.Server.Models;
public class SscModel

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.ComponentModel;
using Aaru.CommonTypes.Metadata;

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Aaru.CommonTypes.Metadata;
namespace Aaru.Server.Models;

View File

@@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace Aaru.Server.Models;
public class UsbModel

View File

@@ -30,7 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using Newtonsoft.Json;
namespace Aaru.Server.Models;

View File

@@ -30,8 +30,6 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

View File

@@ -1,11 +1,7 @@
using System;
using Aaru.CommonTypes.Interop;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

View File

@@ -1,4 +1,3 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace Aaru.Server;

View File

@@ -1,5 +1,3 @@
using System;
using Aaru.Server.Models;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;