Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some solution level usings #4556

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Source/Csla.Analyzers/Csla.Analyzers/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("MicrosoftCodeAnalysisCorrectness", "RS1038:Compiler extensions should be implemented in assemblies with compiler-provided references", Justification = "<Pending>")]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using System.Collections.Immutable;
using System.Reflection;
using static Csla.Analyzers.Extensions.ITypeSymbolExtensions;

namespace Csla.Analyzers.ManagedBackingFieldUsesNameof
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.Editing;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
using Csla.Core;
using Csla.Runtime;
using Microsoft.AspNetCore.Http;
using System.Diagnostics.CodeAnalysis;
using System.Security.Claims;

namespace Csla.AspNetCore
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
// </copyright>
// <summary>Application context manager that uses HttpContextAccessor</summary>
//-----------------------------------------------------------------------

using Csla.Core;
using Csla.State;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Http;
using System.Diagnostics.CodeAnalysis;
using System.Security.Claims;
using System.Security.Principal;

namespace Csla.AspNetCore.Blazor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
// </copyright>
// <summary>Application context manager that uses HttpContextAccessor</summary>
//-----------------------------------------------------------------------

using Csla.Core;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Http;
using System.Security.Claims;
using System.Security.Principal;

namespace Csla.AspNetCore.Blazor
{
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.AspNetCore/Blazor/State/SessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>Manages all user session data</summary>
//-----------------------------------------------------------------------

using System.Collections.Concurrent;
using Csla.State;

namespace Csla.Blazor.State
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.AspNetCore/Blazor/State/StateController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

using Microsoft.AspNetCore.Mvc;
using Csla.State;
using Csla.Security;
using Csla.Blazor.State.Messages;
using Csla.Serialization;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// </copyright>
// <summary>Razor tag helper</summary>
//-----------------------------------------------------------------------

using Csla.Rules;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// </copyright>
// <summary>Razor tag helper</summary>
//-----------------------------------------------------------------------

using Csla.Rules;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// </copyright>
// <summary>Razor tag helper</summary>
//-----------------------------------------------------------------------

using Csla.Rules;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.AspNetCore/PropertyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>Exposes metastate for a property</summary>
//-----------------------------------------------------------------------

using System.ComponentModel;
using Csla.Rules;

namespace Csla.AspNetCore
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.AspNetCore/RazorPages/PageModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using Csla.Rules;
using Csla.Core;
using System.Diagnostics.CodeAnalysis;

namespace Csla.AspNetCore.RazorPages
{
Expand Down
2 changes: 0 additions & 2 deletions Source/Csla.Blazor.WebAssembly/ApplicationContextManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
using Csla.Core;
using Csla.State;
using Microsoft.AspNetCore.Components.Authorization;
using System.Security.Claims;
using System.Security.Principal;

namespace Csla.Blazor.WebAssembly
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// </copyright>
// <summary>Basic implementation of AuthenticationStateProvider</summary>
//-----------------------------------------------------------------------
using System.Security.Claims;

using Microsoft.AspNetCore.Components.Authorization;

namespace Csla.Blazor.Authentication
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.Blazor/CslaValidationMessages.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Csla.Rules;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using System.Linq.Expressions;

namespace Csla.Blazor
{
Expand Down
4 changes: 1 addition & 3 deletions Source/Csla.Blazor/IPropertyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.ComponentModel;

namespace Csla.Blazor
namespace Csla.Blazor
{
/// <summary>
/// Exposes metastate for a property.
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.Blazor/PropertyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>Exposes metastate for a property</summary>
//-----------------------------------------------------------------------

using System.ComponentModel;
using Csla.Rules;

namespace Csla.Blazor
Expand Down
4 changes: 0 additions & 4 deletions Source/Csla.Blazor/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
// <summary>Base type for creating your own view model</summary>
//-----------------------------------------------------------------------

using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Csla.Core;
using Csla.Reflection;
using Csla.Rules;
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.Channels.Grpc/GrpcPortal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>Exposes server-side DataPortal functionality</summary>
//-----------------------------------------------------------------------

using System.Security.Principal;
using Csla.Core;
using Csla.Serialization;
using Csla.Serialization.Mobile;
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.Channels.Grpc/GrpcProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>Implements a data portal proxy to relay data portal</summary>
//-----------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using Csla.Configuration;
using Csla.DataPortalClient;
using Google.Protobuf;
Expand Down
2 changes: 0 additions & 2 deletions Source/Csla.Channels.RabbitMq/ProxyListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
// <summary>Handles replies from data portal server</summary>
//-----------------------------------------------------------------------

using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;

Expand Down
3 changes: 0 additions & 3 deletions Source/Csla.Channels.RabbitMq/RabbitMqPortal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
// <summary>Exposes server-side DataPortal functionality through RabbitMQ</summary>
//-----------------------------------------------------------------------

using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Security.Principal;
using Csla.Core;
using Csla.Serialization;
using Csla.Serialization.Mobile;
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.Channels.RabbitMq/RabbitMqProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>Implements a data portal proxy to relay data portal</summary>
//-----------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using Csla.DataPortalClient;
using Csla.Server;
using RabbitMQ.Client;
Expand Down
3 changes: 1 addition & 2 deletions Source/Csla.Channels.RabbitMq/WorkInProgress.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Concurrent;
using Csla.Threading;
using Csla.Threading;

namespace Csla.Channels.RabbitMq
{
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.Data.SqlClient.Fx/SafeSqlDataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>This is a SqlDataReader based on SafeDataReader</summary>
//-----------------------------------------------------------------------

using System.Data;
#if NETFX
using System.Data.SqlClient;
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>Extract the definitions of all properties of a type for source generation</summary>
//-----------------------------------------------------------------------

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace Csla.Generator.AutoImplementProperties.CSharp.AutoImplement.Discovery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// </copyright>
// <summary>Extract the definition of a type for source generation</summary>
//-----------------------------------------------------------------------
using System.Text;

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// </copyright>
// <summary>Source generator for interface implementation</summary>
//-----------------------------------------------------------------------
using System.Text;

using Csla.Generator.AutoImplementProperties.CSharp.AutoImplement.Discovery;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// </copyright>
// <summary>Source generator for partial properties implementation</summary>
//-----------------------------------------------------------------------
using System.Text;

using Csla.Generator.AutoImplementProperties.CSharp.AutoImplement.Discovery;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// </copyright>
// <summary>Extension methods for the Exception type</summary>
//-----------------------------------------------------------------------

using Microsoft.CodeAnalysis;

namespace Csla.Generator.AutoImplementProperties.CSharp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// </copyright>
// <summary>Extract the definitions of the containers of a type</summary>
//-----------------------------------------------------------------------

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System.Text;

namespace Csla.Generator.AutoSerialization.CSharp.AutoSerialization.Discovery
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// </copyright>
// <summary>Helper for definition extraction, used to optimise symbo, recognition</summary>
//-----------------------------------------------------------------------

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// </copyright>
// <summary>Extract the definition of a type for source generation</summary>
//-----------------------------------------------------------------------

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System.Text;

namespace Csla.Generator.AutoSerialization.CSharp.AutoSerialization.Discovery
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Text;
using Csla.Generator.AutoSerialization.CSharp.AutoSerialization.Discovery;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// </copyright>
// <summary>Extension methods for the Exception type</summary>
//-----------------------------------------------------------------------

using Microsoft.CodeAnalysis;

namespace Csla.Generator.AutoSerialization.CSharp
Expand Down
1 change: 1 addition & 0 deletions Source/Csla.Web.Mvc.Shared/ApplicationContextManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// </copyright>
// <summary>Application context manager that uses HttpContext</summary>
//-----------------------------------------------------------------------

using Csla.Core;
using System.Web;

Expand Down
1 change: 1 addition & 0 deletions Source/Csla.Web.Mvc.Shared/AsyncController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// </copyright>
// <summary>Provides methods that respond to HTTP requests</summary>
//-----------------------------------------------------------------------

using System.Web.Mvc;

namespace Csla.Web.Mvc
Expand Down
3 changes: 0 additions & 3 deletions Source/Csla.Web.Mvc.Shared/CslaModelBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>Model binder for use with CSLA .NET editable business objects.</summary>
//-----------------------------------------------------------------------
#if NETSTANDARD2_0 || NET8_0_OR_GREATER
using System.Collections;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.Extensions.DependencyInjection;

Expand Down Expand Up @@ -127,8 +126,6 @@ private void BindSingleProperty(ModelBindingContext bindingContext, object resul
}
#elif !NETSTANDARD
using System.Web.Mvc;
using System.ComponentModel;
using System.Collections;
using Csla.Core;

namespace Csla.Web.Mvc
Expand Down
6 changes: 3 additions & 3 deletions Source/Csla.Web.Mvc.Shared/HtmlExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public static class HtmlExtensions
/// <param name="expression">Model property</param>
public static HtmlString InformationFor<T>(
this IHtmlHelper<T> htmlHelper,
System.Linq.Expressions.Expression<Func<T, object>> expression)
Expression<Func<T, object>> expression)
{
var result = string.Empty;
var model = htmlHelper.ViewData.Model;
System.Reflection.PropertyInfo reflectedPropertyInfo = Reflection.Reflect<T>.GetProperty(expression);
PropertyInfo reflectedPropertyInfo = Reflection.Reflect<T>.GetProperty(expression);
var propertyName = reflectedPropertyInfo.Name;
if (model is Core.BusinessBase bb)
result = bb.BrokenRulesCollection.ToString(",", Rules.RuleSeverity.Information, propertyName);
Expand Down Expand Up @@ -65,7 +65,7 @@ public static HtmlString WarningFor<T>(
/// <param name="expression">Model property</param>
public static HtmlString ErrorFor<T>(
this IHtmlHelper<T> htmlHelper,
System.Linq.Expressions.Expression<Func<T, object>> expression)
Expression<Func<T, object>> expression)
{
var result = string.Empty;
var model = htmlHelper.ViewData.Model;
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla.Web.Mvc.Shared/Server/Hosts/HttpPortal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// </copyright>
// <summary>Exposes server-side DataPortal functionality</summary>
//-----------------------------------------------------------------------

using Csla.Serialization.Mobile;
using Csla.Core;
using System.Security.Principal;
using Csla.Serialization;
using Csla.Server.Hosts.DataPortalChannel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// <summary>Exposes server-side DataPortal functionality</summary>
//-----------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using Csla.Serialization;
using Csla.Server.Hosts.DataPortalChannel;

Expand Down
1 change: 1 addition & 0 deletions Source/Csla.Web.Mvc.Shared/ViewModelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// </copyright>
// <summary>Base class used to create ViewModel objects that contain the Model object and related elements.</summary>
//-----------------------------------------------------------------------

using System.Web.Mvc;
using Csla.Core;

Expand Down
Loading
Loading