Browse Source

Cleaning up warnings.

pull/20539/head
Mark Cilia Vincenti 1 year ago
parent
commit
de877d8a36
  1. 2
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs
  2. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/DatePicker/AbpDatePickerBaseTagHelperService.cs
  3. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs
  4. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs
  5. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/ValidationAttributeHelper.cs
  6. 4
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs
  7. 1
      framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/IPermissionDefinitionContext.cs
  8. 2
      framework/src/Volo.Abp.BlazoriseUI/Components/UiNotificationAlert.razor
  9. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
  10. 20
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs
  11. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/DotnetEfToolManager.cs
  12. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/TranslateCommand.cs
  13. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNugetPackageAdder.cs
  14. 8
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs
  15. 4
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRootWithUser.cs
  16. 4
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRootWithUser.cs
  17. 2
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntityWithUser.cs
  18. 2
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntityWithUser.cs
  19. 2
      framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs
  20. 2
      framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/ConnectionStrings/MySqlConnectionStringChecker.cs
  21. 2
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/ConnectionStrings/OracleDevartConnectionStringChecker.cs
  22. 2
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/ConnectionStrings/OracleConnectionStringChecker.cs
  23. 2
      framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo/Abp/EntityFrameworkCore/ConnectionStrings/NpgsqlConnectionStringChecker.cs
  24. 2
      framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo/Abp/EntityFrameworkCore/ConnectionStrings/SqlServerConnectionStringChecker.cs
  25. 2
      framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/ConnectionStrings/SqliteConnectionStringChecker.cs
  26. 4
      framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/DistributedEventBusBase.cs
  27. 6
      framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidType.cs
  28. 2
      framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpNewtonsoftJsonSerializer.cs
  29. 2
      framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/ConnectionStrings/MongoDBConnectionStringChecker.cs
  30. 2
      framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs
  31. 8
      framework/src/Volo.Abp.ObjectMapping/Volo/Abp/ObjectMapping/IObjectMapper.cs
  32. 4
      framework/src/Volo.Abp.TextTemplating.Core/Volo/Abp/TextTemplating/TemplateDefinition.cs
  33. 4
      framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/EmptyProjectFileSystem.cs
  34. 1
      framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/ApplicationMenuItem.cs
  35. 3
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ContentFormatters/RemoteStreamContentTestController.cs
  36. 2
      framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/TestAppDbContext.cs

2
framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs

@ -67,7 +67,7 @@ public class AbpAspNetCoreMultiTenancyOptions
}
}
context.Response.Headers.Add("Abp-Tenant-Resolve-Error", HtmlEncoder.Default.Encode(exception.Message));
context.Response.Headers.Append("Abp-Tenant-Resolve-Error", HtmlEncoder.Default.Encode(exception.Message));
if (isCookieAuthentication && context.Request.Method.Equals("Get", StringComparison.OrdinalIgnoreCase) && !context.Request.IsAjax())
{
context.Response.Redirect(context.Request.GetEncodedUrl());

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/DatePicker/AbpDatePickerBaseTagHelperService.cs

@ -364,12 +364,14 @@ public abstract class AbpDatePickerBaseTagHelperService<TTagHelper> : AbpTagHelp
attrList.Add("data-parent-el", options.ParentEl);
}
#pragma warning disable CS0618 // Type or member is obsolete
if (!options.DateFormat.IsNullOrEmpty())
{
attrList.Add("data-date-format", options.DateFormat);
}
if(!options.VisibleDateFormat.IsNullOrEmpty())
#pragma warning restore CS0618 // Type or member is obsolete
if (!options.VisibleDateFormat.IsNullOrEmpty())
{
attrList.Add("data-visible-date-format", options.VisibleDateFormat);
}

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs

@ -103,7 +103,7 @@ public class AbpUowActionFilter : IAsyncActionFilter, IAbpFilter, ITransientDepe
{
await currentUow.SaveChangesAsync(context.HttpContext.RequestAborted);
}
catch (Exception e)
catch (Exception)
{
await currentUow.RollbackAsync(context.HttpContext.RequestAborted);
throw;

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs

@ -109,7 +109,7 @@ public class AbpUowPageFilter : IAsyncPageFilter, IAbpFilter, ITransientDependen
{
await currentUow.SaveChangesAsync(context.HttpContext.RequestAborted);
}
catch (Exception e)
catch (Exception)
{
await currentUow.RollbackAsync(context.HttpContext.RequestAborted);
throw;

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/ValidationAttributeHelper.cs

@ -30,7 +30,7 @@ public static class ValidationAttributeHelper
var errorMessageString = ValidationAttributeErrorMessageStringProperty.GetValue(validationAttribute) as string;
validationAttribute.ErrorMessage = errorMessageString;
}
catch (Exception e)
catch (Exception)
{
// ignored
}

4
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs

@ -82,8 +82,8 @@ public class AbpExceptionHandlingMiddleware : AbpMiddlewareBase, ITransientDepen
httpContext.Response.Clear();
httpContext.Response.StatusCode = (int)statusCodeFinder.GetStatusCode(httpContext, exception);
httpContext.Response.OnStarting(_clearCacheHeadersDelegate, httpContext.Response);
httpContext.Response.Headers.Add(AbpHttpConsts.AbpErrorFormat, "true");
httpContext.Response.Headers.Add("Content-Type", "application/json");
httpContext.Response.Headers.Append(AbpHttpConsts.AbpErrorFormat, "true");
httpContext.Response.Headers.Append("Content-Type", "application/json");
await httpContext.Response.WriteAsync(
jsonSerializer.Serialize(

1
framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/IPermissionDefinitionContext.cs

@ -32,7 +32,6 @@ public interface IPermissionDefinitionContext
/// Throws <see cref="AbpException"/> if there is a group with the name.
/// <param name="name">Name of the group</param>
/// <param name="displayName">Localized display name of the group</param>
/// <param name="multiTenancySide">Select a multi-tenancy side</param>
/// </summary>
PermissionGroupDefinition AddGroup(
[NotNull] string name,

2
framework/src/Volo.Abp.BlazoriseUI/Components/UiNotificationAlert.razor

@ -1 +1 @@
<SnackbarStack @ref="SnackbarStack" Location="SnackbarStackLocation.End" Multiline="true" DelayCloseOnClick="true" DelayCloseOnClickInterval="10000" Closed="@OnSnackbarClosed" />
<SnackbarStack @ref="SnackbarStack" Location="SnackbarStackLocation.BottomEnd" Multiline="true" DelayCloseOnClick="true" DelayCloseOnClickInterval="10000" Closed="@OnSnackbarClosed" />

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

@ -151,7 +151,7 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
var redis = await ConnectionMultiplexer.ConnectAsync("127.0.0.1", options => options.ConnectTimeout = 3000);
isConnected = redis.IsConnected;
}
catch (Exception e)
catch (Exception)
{
// ignored
}

20
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

@ -81,7 +81,7 @@ public abstract class ProjectCreationCommandBase
if (version != null)
{
Logger.LogInformation("Version: " + version);
Logger.LogInformation($"Version: {version}");
}
var preview = commandLineArgs.Options.ContainsKey(Options.Preview.Long);
@ -110,25 +110,25 @@ public abstract class ProjectCreationCommandBase
var databaseProvider = GetDatabaseProvider(commandLineArgs);
if (databaseProvider != DatabaseProvider.NotSpecified)
{
Logger.LogInformation("Database provider: " + databaseProvider);
Logger.LogInformation($"Database provider: {databaseProvider}");
}
var connectionString = GetConnectionString(commandLineArgs);
if (connectionString != null)
{
Logger.LogInformation("Connection string: " + connectionString);
Logger.LogInformation($"Connection string: {connectionString}");
}
var databaseManagementSystem = GetDatabaseManagementSystem(commandLineArgs);
if (databaseManagementSystem != DatabaseManagementSystem.NotSpecified)
{
Logger.LogInformation("DBMS: " + databaseManagementSystem);
Logger.LogInformation($"DBMS: {databaseManagementSystem}");
}
var uiFramework = GetUiFramework(commandLineArgs, template);
if (uiFramework != UiFramework.NotSpecified)
{
Logger.LogInformation("UI Framework: " + uiFramework);
Logger.LogInformation($"UI Framework: {uiFramework}");
}
var publicWebSite = uiFramework != UiFramework.None && commandLineArgs.Options.ContainsKey(Options.PublicWebSite.Long);
@ -140,25 +140,25 @@ public abstract class ProjectCreationCommandBase
var mobileApp = GetMobilePreference(commandLineArgs);
if (mobileApp != MobileApp.None)
{
Logger.LogInformation("Mobile App: " + mobileApp);
Logger.LogInformation($"Mobile App: {mobileApp}");
}
var gitHubAbpLocalRepositoryPath = commandLineArgs.Options.GetOrNull(Options.GitHubAbpLocalRepositoryPath.Long);
if (gitHubAbpLocalRepositoryPath != null)
{
Logger.LogInformation("GitHub Abp Local Repository Path: " + gitHubAbpLocalRepositoryPath);
Logger.LogInformation($"GitHub Abp Local Repository Path: {gitHubAbpLocalRepositoryPath}");
}
var gitHubVoloLocalRepositoryPath = commandLineArgs.Options.GetOrNull(Options.GitHubVoloLocalRepositoryPath.Long);
if (gitHubVoloLocalRepositoryPath != null)
{
Logger.LogInformation("GitHub Volo Local Repository Path: " + gitHubVoloLocalRepositoryPath);
Logger.LogInformation($"GitHub Volo Local Repository Path: {gitHubVoloLocalRepositoryPath}");
}
var templateSource = commandLineArgs.Options.GetOrNull(Options.TemplateSource.Short, Options.TemplateSource.Long);
if (templateSource != null)
{
Logger.LogInformation("Template Source: " + templateSource);
Logger.LogInformation($"Template Source: {templateSource}");
}
var createSolutionFolder = GetCreateSolutionFolderPreference(commandLineArgs);
@ -216,7 +216,7 @@ public abstract class ProjectCreationCommandBase
IO.DirectoryHelper.CreateIfNotExists(outputFolder);
Logger.LogInformation("Output folder: " + outputFolder);
Logger.LogInformation($"Output folder: {outputFolder}");
if (connectionString == null &&
databaseManagementSystem != DatabaseManagementSystem.NotSpecified &&

8
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/DotnetEfToolManager.cs

@ -20,12 +20,10 @@ public class DotnetEfToolManager : ISingletonDependency
public async Task BeSureInstalledAsync()
{
if (IsDotNetEfToolInstalled())
if (!IsDotNetEfToolInstalled())
{
return;
}
InstallDotnetEfTool();
InstallDotnetEfTool();
}
}
private bool IsDotNetEfToolInstalled()

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/TranslateCommand.cs

@ -412,7 +412,7 @@ public class TranslateCommand : IConsoleCommand, ITransientDependency
{
jObject = JObject.Parse(json);
}
catch (Exception e)
catch (Exception)
{
return null;
}

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNugetPackageAdder.cs

@ -291,7 +291,7 @@ public class ProjectNugetPackageAdder : ITransientDependency
{
await RunBundleForBlazorAsync(projectFile);
}
catch (Exception e)
catch (Exception)
{
Logger.LogWarning("Couldn't run bundle for blazor.");
}

8
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs

@ -20,23 +20,23 @@ public interface IAbpCommonDbContextRegistrationOptionsBuilder
/// <summary>
/// Registers default repositories for all the entities in this DbContext.
/// Default repositories will use given <see cref="TDefaultRepositoryDbContext"/>.
/// Default repositories will use given <typeparamref name="TDefaultRepositoryDbContext"/>.
/// </summary>
/// <typeparam name="TDefaultRepositoryDbContext">DbContext type that will be used by default repositories</typeparam>
/// <param name="includeAllEntities">
/// Registers repositories only for aggregate root entities by default.
/// Set <see cref="includeAllEntities"/> to true to include all entities.
/// Set <paramref name="includeAllEntities"/> to true to include all entities.
/// </param>
IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories<TDefaultRepositoryDbContext>(bool includeAllEntities = false);
/// <summary>
/// Registers default repositories for all the entities in this DbContext.
/// Default repositories will use given <see cref="defaultRepositoryDbContextType"/>.
/// Default repositories will use given <paramref name="defaultRepositoryDbContextType"/>.
/// </summary>
/// <param name="defaultRepositoryDbContextType">DbContext type that will be used by default repositories</param>
/// <param name="includeAllEntities">
/// Registers repositories only for aggregate root entities by default.
/// Set <see cref="includeAllEntities"/> to true to include all entities.
/// Set <paramref name="includeAllEntities"/> to true to include all entities.
/// </param>
IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(Type defaultRepositoryDbContextType, bool includeAllEntities = false);

4
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRootWithUser.cs

@ -4,7 +4,7 @@ using Volo.Abp.Auditing;
namespace Volo.Abp.Domain.Entities.Auditing;
/// <summary>
/// This class can be used to simplify implementing <see cref="IAuditedObjectObject{TUser}"/> for aggregate roots.
/// This class can be used to simplify implementing <see cref="IAuditedObject{TUser}"/> for aggregate roots.
/// </summary>
/// <typeparam name="TUser">Type of the user</typeparam>
[Serializable]
@ -19,7 +19,7 @@ public abstract class AuditedAggregateRootWithUser<TUser> : AuditedAggregateRoot
}
/// <summary>
/// This class can be used to simplify implementing <see cref="IAuditedObjectObject{TUser}"/> for aggregate roots.
/// This class can be used to simplify implementing <see cref="IAuditedObject{TUser}"/> for aggregate roots.
/// </summary>
/// <typeparam name="TKey">Type of the primary key of the entity</typeparam>
/// <typeparam name="TUser">Type of the user</typeparam>

4
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRootWithUser.cs

@ -4,7 +4,7 @@ using Volo.Abp.Auditing;
namespace Volo.Abp.Domain.Entities.Auditing;
/// <summary>
/// This class can be used to simplify implementing <see cref="ICreationAuditedObjectObject{TCreator}"/> for aggregate roots.
/// This class can be used to simplify implementing <see cref="ICreationAuditedObject{TCreator}"/> for aggregate roots.
/// </summary>
/// <typeparam name="TUser">Type of the user</typeparam>
[Serializable]
@ -15,7 +15,7 @@ public abstract class CreationAuditedAggregateRootWithUser<TUser> : CreationAudi
}
/// <summary>
/// This class can be used to simplify implementing <see cref="ICreationAuditedObjectObject{TCreator}"/> for aggregate roots.
/// This class can be used to simplify implementing <see cref="ICreationAuditedObject{TCreator}"/> for aggregate roots.
/// </summary>
/// <typeparam name="TKey">Type of the primary key of the entity</typeparam>
/// <typeparam name="TUser">Type of the user</typeparam>

2
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntityWithUser.cs

@ -15,7 +15,7 @@ public abstract class CreationAuditedEntityWithUser<TUser> : CreationAuditedEnti
}
/// <summary>
/// This class can be used to simplify implementing <see cref="ICreationAuditedObjectObject{TCreator}"/>.
/// This class can be used to simplify implementing <see cref="ICreationAuditedObject{TCreator}"/>.
/// </summary>
/// <typeparam name="TKey">Type of the primary key of the entity</typeparam>
/// <typeparam name="TUser">Type of the user</typeparam>

2
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntityWithUser.cs

@ -22,7 +22,7 @@ public abstract class FullAuditedEntityWithUser<TUser> : FullAuditedEntity, IFul
}
/// <summary>
/// Implements <see cref="IFullAuditedObjectObject{TUser}"/> to be a base class for full-audited entities.
/// Implements <see cref="IFullAuditedObject{TUser}"/> to be a base class for full-audited entities.
/// </summary>
/// <typeparam name="TKey">Type of the primary key of the entity</typeparam>
/// <typeparam name="TUser">Type of the user</typeparam>

2
framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs

@ -13,7 +13,9 @@ namespace Volo.Abp.Emailing;
typeof(AbpVirtualFileSystemModule),
typeof(AbpBackgroundJobsAbstractionsModule),
typeof(AbpLocalizationModule),
#pragma warning disable CS0618 // Type or member is obsolete
typeof(AbpTextTemplatingModule)
#pragma warning restore CS0618 // Type or member is obsolete
)]
public class AbpEmailingModule : AbpModule
{

2
framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/ConnectionStrings/MySqlConnectionStringChecker.cs

@ -32,7 +32,7 @@ public class MySqlConnectionStringChecker : IConnectionStringChecker, ITransient
return result;
}
catch (Exception e)
catch (Exception)
{
return result;
}

2
framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/ConnectionStrings/OracleDevartConnectionStringChecker.cs

@ -28,7 +28,7 @@ public class OracleDevartConnectionStringChecker : IConnectionStringChecker, ITr
return result;
}
catch (Exception e)
catch (Exception)
{
return result;
}

2
framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/ConnectionStrings/OracleConnectionStringChecker.cs

@ -28,7 +28,7 @@ public class OracleConnectionStringChecker : IConnectionStringChecker, ITransien
return result;
}
catch (Exception e)
catch (Exception)
{
return result;
}

2
framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo/Abp/EntityFrameworkCore/ConnectionStrings/NpgsqlConnectionStringChecker.cs

@ -32,7 +32,7 @@ public class NpgsqlConnectionStringChecker : IConnectionStringChecker, ITransien
return result;
}
catch (Exception e)
catch (Exception)
{
return result;
}

2
framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo/Abp/EntityFrameworkCore/ConnectionStrings/SqlServerConnectionStringChecker.cs

@ -32,7 +32,7 @@ public class SqlServerConnectionStringChecker : IConnectionStringChecker, ITrans
return result;
}
catch (Exception e)
catch (Exception)
{
return result;
}

2
framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/ConnectionStrings/SqliteConnectionStringChecker.cs

@ -24,7 +24,7 @@ public class SqliteConnectionStringChecker : IConnectionStringChecker, ITransien
return result;
}
catch (Exception e)
catch (Exception)
{
return result;
}

4
framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/DistributedEventBusBase.cs

@ -224,7 +224,7 @@ public abstract class DistributedEventBusBase : EventBusBase, IDistributedEventB
{
await LocalEventBus.PublishAsync(distributedEvent);
}
catch (Exception _)
catch (Exception)
{
// ignored
}
@ -236,7 +236,7 @@ public abstract class DistributedEventBusBase : EventBusBase, IDistributedEventB
{
await LocalEventBus.PublishAsync(distributedEvent);
}
catch (Exception _)
catch (Exception)
{
// ignored
}

6
framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidType.cs

@ -1,4 +1,6 @@
namespace Volo.Abp.Guids;
using System;
namespace Volo.Abp.Guids;
/// <summary>
/// Describes the type of a sequential GUID value.
@ -12,7 +14,7 @@ public enum SequentialGuidType
SequentialAsString,
/// <summary>
/// The GUID should be sequential when formatted using the <see cref="Guid.ToByteArray" /> method.
/// The GUID should be sequential when formatted using the <see cref="Guid.ToByteArray()" /> method.
/// Used by Oracle.
/// </summary>
SequentialAsBinary,

2
framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpNewtonsoftJsonSerializer.cs

@ -45,6 +45,7 @@ public class AbpNewtonsoftJsonSerializer : IJsonSerializer, ITransientDependency
indented
}, _ =>
{
#pragma warning disable CS0618 // Type or member is obsolete
var settings = new JsonSerializerSettings
{
Binder = Options.Value.JsonSerializerSettings.Binder,
@ -80,6 +81,7 @@ public class AbpNewtonsoftJsonSerializer : IJsonSerializer, ITransientDependency
TypeNameHandling = Options.Value.JsonSerializerSettings.TypeNameHandling,
TypeNameAssemblyFormatHandling = Options.Value.JsonSerializerSettings.TypeNameAssemblyFormatHandling
};
#pragma warning restore CS0618 // Type or member is obsolete
if (!camelCase)
{

2
framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/ConnectionStrings/MongoDBConnectionStringChecker.cs

@ -22,7 +22,7 @@ public class MongoDBConnectionStringChecker : IConnectionStringChecker, ITransie
DatabaseExists = true
});
}
catch (Exception e)
catch (Exception)
{
return Task.FromResult(new AbpConnectionStringCheckResult());
}

2
framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs

@ -242,7 +242,7 @@ public class UnitOfWorkMongoDbContextProvider<TMongoDbContext> : IMongoDbContext
{
session.StartTransaction();
}
catch (NotSupportedException e)
catch (NotSupportedException)
{
Logger.LogWarning(TransactionsNotSupportedWarningMessage);

8
framework/src/Volo.Abp.ObjectMapping/Volo/Abp/ObjectMapping/IObjectMapper.cs

@ -11,7 +11,7 @@ public interface IObjectMapper
IAutoObjectMappingProvider AutoObjectMappingProvider { get; }
/// <summary>
/// Converts an object to another. Creates a new object of <see cref="TDestination"/>.
/// Converts an object to another. Creates a new object of <typeparamref name="TDestination" />.
/// </summary>
/// <typeparam name="TDestination">Type of the destination object</typeparam>
/// <typeparam name="TSource">Type of the source object</typeparam>
@ -25,7 +25,7 @@ public interface IObjectMapper
/// <typeparam name="TDestination">Destination type</typeparam>
/// <param name="source">Source object</param>
/// <param name="destination">Destination object</param>
/// <returns>Returns the same <see cref="destination"/> object after mapping operation</returns>
/// <returns>Returns the same <paramref name="destination" /> object after mapping operation</returns>
TDestination Map<TSource, TDestination>(TSource source, TDestination destination);
}
@ -46,7 +46,7 @@ public interface IObjectMapper<TContext> : IObjectMapper
public interface IObjectMapper<in TSource, TDestination>
{
/// <summary>
/// Converts an object to another. Creates a new object of <see cref="TDestination"/>.
/// Converts an object to another. Creates a new object of <typeparamref name="TDestination"/>.
/// </summary>
/// <param name="source">Source object</param>
TDestination Map(TSource source);
@ -56,6 +56,6 @@ public interface IObjectMapper<in TSource, TDestination>
/// </summary>
/// <param name="source">Source object</param>
/// <param name="destination">Destination object</param>
/// <returns>Returns the same <see cref="destination"/> object after mapping operation</returns>
/// <returns>Returns the same <paramref name="destination"/> object after mapping operation</returns>
TDestination Map(TSource source, TDestination destination);
}

4
framework/src/Volo.Abp.TextTemplating.Core/Volo/Abp/TextTemplating/TemplateDefinition.cs

@ -39,8 +39,8 @@ public class TemplateDefinition : IHasNameWithLocalizableDisplayName
/// </summary>
/// <param name="name">Name of the property</param>
/// <returns>
/// Returns the value in the <see cref="Properties"/> dictionary by given <see cref="name"/>.
/// Returns null if given <see cref="name"/> is not present in the <see cref="Properties"/> dictionary.
/// Returns the value in the <see cref="Properties"/> dictionary by given <paramref name="name"/>.
/// Returns null if given <paramref name="name"/> is not present in the <see cref="Properties"/> dictionary.
/// </returns>
public object? this[string name] {
get => Properties.GetOrDefault(name);

4
framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/EmptyProjectFileSystem.cs

@ -12,11 +12,13 @@ internal class EmptyProjectFileSystem : RazorProjectFileSystem
public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
{
NormalizeAndEnsureValidPath(basePath);
return Enumerable.Empty<RazorProjectItem>();
return [];
}
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
#pragma warning disable CS0809 // Obsolete member overrides non-obsolete member
public override RazorProjectItem GetItem(string path)
#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member
{
return GetItem(path, fileKind: null);
}

1
framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/ApplicationMenuItem.cs

@ -126,6 +126,7 @@ public class ApplicationMenuItem : IHasMenuItems, IHasSimpleStateCheckers<Applic
RequiredPermissionName = requiredPermissionName;
StateCheckers = new List<ISimpleStateChecker<ApplicationMenuItem>>();
Items = new ApplicationMenuItemList();
}
/// <summary>

3
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ContentFormatters/RemoteStreamContentTestController.cs

@ -1,6 +1,7 @@
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Shouldly;
using Volo.Abp.Content;
@ -27,7 +28,7 @@ public class RemoteStreamContentTestController : AbpController
var memoryStream = new MemoryStream();
await memoryStream.WriteAsync(Encoding.UTF8.GetBytes("DownloadAsync"));
memoryStream.Position = 0;
Response.Headers.Add("Content-Disposition", "attachment; filename=myDownload.rtf");
Response.Headers.Append("Content-Disposition", "attachment; filename=myDownload.rtf");
return new RemoteStreamContent(memoryStream, "download.rtf", "application/rtf");
}

2
framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/TestAppDbContext.cs

@ -14,8 +14,6 @@ namespace Volo.Abp.TestApp.EntityFrameworkCore;
[ReplaceDbContext(typeof(IFourthDbContext))]
public class TestAppDbContext : AbpDbContext<TestAppDbContext>, IThirdDbContext, IFourthDbContext
{
private DbSet<FourthDbContextDummyEntity> _dummyEntities;
private DbSet<FourthDbContextDummyEntity> _dummyEntities1;
public DbSet<Person> People { get; set; }
public DbSet<City> Cities { get; set; }

Loading…
Cancel
Save