chore: Enable some code analyze rules (#4126)

* style: update editorconfig

- update editorconfig encoding to utf8
- add CA1852 and IDE0005 rules

* style: apply dotnet-format

* style: add IDE0040 rule

* style: apply dotnet-format

* refactor: sealed SimpleEmbeddedJsonLocalizerFactory

* style: add style rule for modifiers

* fix: resolve dotnet-format unmerged issue

* fix: add back translation

---------

Co-authored-by: James Yeung <shunjiey@hotmail.com>
This commit is contained in:
Weihan Li 2024-08-28 00:54:33 +08:00 committed by GitHub
parent eb5b19ac59
commit 9fa391449a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
432 changed files with 1922 additions and 682 deletions

View File

@ -53,6 +53,8 @@ dotnet_style_qualification_for_event = false:refactoring
# Use language keywords instead of framework type names for type references # Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion dotnet_style_predefined_type_for_member_access = true:suggestion
# Always add accessibility modifiers
dotnet_style_require_accessibility_modifiers=always:warning
# Suggest more modern language features when available # Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion dotnet_style_object_initializer = true:suggestion
@ -232,23 +234,32 @@ dotnet_diagnostic.CS8509.severity = error
# CA2007: Consider calling ConfigureAwait on the awaited task # CA2007: Consider calling ConfigureAwait on the awaited task
dotnet_diagnostic.CA2007.severity = none dotnet_diagnostic.CA2007.severity = none
# CA2227: 集合属性应为只读 # CA2227: 集合属性应为只读
dotnet_diagnostic.CA2227.severity = none dotnet_diagnostic.CA2227.severity = none
# CA1303: 请不要将文本作为本地化参数传递 # CA1303: 请不要将文本作为本地化参数传递
dotnet_diagnostic.CA1303.severity = none dotnet_diagnostic.CA1303.severity = none
# CA2208: 正确实例化参数异常 # CA2208: 正确实例化参数异常
dotnet_diagnostic.CA2208.severity = none dotnet_diagnostic.CA2208.severity = none
# CA1819: 属性不应返回数组 # CA1819: 属性不应返回数组
dotnet_diagnostic.CA1819.severity = none dotnet_diagnostic.CA1819.severity = none
# CA2225: 运算符重载具有命名的备用项 # CA2225: 运算符重载具有命名的备用项
dotnet_diagnostic.CA2225.severity = none dotnet_diagnostic.CA2225.severity = none
# CA1308: 将字符串规范化为大写 # CA1308: 将字符串规范化为大写
dotnet_diagnostic.CA1308.severity = none dotnet_diagnostic.CA1308.severity = none
# CA1040: 避免使用空接口 # CA1040: 避免使用空接口
dotnet_diagnostic.CA1040.severity = none dotnet_diagnostic.CA1040.severity = none
# CA1852: sealed internal types, https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1852
dotnet_diagnostic.CA1852.severity = warning
# IDE0040: add accessibility modifiers, https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0040
dotnet_diagnostic.IDE0040.severity = warning
# IDE005: remove unnecessary usings, https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0005?pivots=lang-csharp-vb
dotnet_diagnostic.IDE0005.severity = error

View File

@ -1,7 +1,6 @@
// This file is used by Code Analysis to maintain SuppressMessage // Licensed to the .NET Foundation under one or more agreements.
// attributes that are applied to this project. // The .NET Foundation licenses this file to you under the MIT license.
// Project-level suppressions either have no target or are given // See the LICENSE file in the project root for more information.
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;

View File

@ -1,4 +1,8 @@
namespace System.Runtime.CompilerServices // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Runtime.CompilerServices
{ {
internal sealed class IsExternalInit internal sealed class IsExternalInit
{ {

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public static class AlertType public static class AlertType
{ {

View File

@ -1,4 +1,8 @@
using System.Collections.Generic; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System.Collections.Generic; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System.Threading.Tasks; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web;

View File

@ -1,4 +1,8 @@
using Microsoft.AspNetCore.Components; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System.Threading.Tasks; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web;

View File

@ -1,4 +1,8 @@
using Microsoft.AspNetCore.Components; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web;

View File

@ -1,4 +1,8 @@
using System.Collections.Generic; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public static class AvatarShape public static class AvatarShape
{ {

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public static class BadgeColor public static class BadgeColor
{ {

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public static class BadgeStatus public static class BadgeStatus
{ {

View File

@ -1,6 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace AntDesign.Internal namespace AntDesign.Internal

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public static class CarouselDotPosition public static class CarouselDotPosition
{ {

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public static class CarouselEffect public static class CarouselEffect
{ {

View File

@ -1,4 +1,8 @@
using System.Collections.Generic; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace AntDesign namespace AntDesign

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public class CheckboxOption<TValue> public class CheckboxOption<TValue>
{ {

View File

@ -3,12 +3,12 @@
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System; using System;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using AntDesign.Internal;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using AntDesign.Internal;
using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using AntDesign.Internal; using AntDesign.Internal;

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public enum CheckboxGroupMixedMode public enum CheckboxGroupMixedMode
{ {

View File

@ -2,10 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
namespace AntDesign namespace AntDesign
{ {

View File

@ -2,10 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
namespace AntDesign.Internal namespace AntDesign.Internal
{ {
public interface ICheckboxGroup public interface ICheckboxGroup

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public static class CollapseExpandIconPosition public static class CollapseExpandIconPosition
{ {

View File

@ -1,4 +1,8 @@
using System.Threading.Tasks; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Threading.Tasks;
using AntDesign.JsInterop; using AntDesign.JsInterop;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;

View File

@ -1,4 +1,8 @@
using System.Collections.Generic; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.JSInterop; using Microsoft.JSInterop;

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public sealed class GlobalTheme : EnumValue<GlobalTheme, string> public sealed class GlobalTheme : EnumValue<GlobalTheme, string>
{ {

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public class AntSizeLDSType public class AntSizeLDSType
{ {

View File

@ -1,9 +1,13 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using AntDesign.Core.Extensions;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop; using Microsoft.JSInterop;
using AntDesign.Core.Extensions;
namespace AntDesign namespace AntDesign
{ {
@ -109,7 +113,7 @@ namespace AntDesign
/// </summary> /// </summary>
/// <param name="target">Element that will receive focus.</param> /// <param name="target">Element that will receive focus.</param>
/// <param name="preventScroll">Whether to scroll to focused element</param> /// <param name="preventScroll">Whether to scroll to focused element</param>
protected async Task FocusAsync(ElementReference target, bool preventScroll = false) protected async Task FocusAsync(ElementReference target, bool preventScroll = false)
=> await Js.FocusAsync(target, preventScroll); => await Js.FocusAsync(target, preventScroll);
/// <summary> /// <summary>

View File

@ -1,4 +1,8 @@
using Microsoft.AspNetCore.Components; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering; using Microsoft.AspNetCore.Components.Rendering;
namespace AntDesign namespace AntDesign

View File

@ -1,4 +1,8 @@
using Microsoft.AspNetCore.Components; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;

View File

@ -1,4 +1,9 @@
using Microsoft.AspNetCore.Components; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Text.Json; using System.Text.Json;

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
internal enum PlacementDirection internal enum PlacementDirection
{ {

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public enum TriggerBoundaryAdjustMode public enum TriggerBoundaryAdjustMode
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.ComponentModel; using System.ComponentModel;
namespace AntDesign namespace AntDesign

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public class FormConfig public class FormConfig
{ {

View File

@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
namespace AntDesign namespace AntDesign
{ {
public class FormValidateErrorMessages public class FormValidateErrorMessages

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Globalization; using System.Globalization;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public enum AntDirectionVHIType public enum AntDirectionVHIType
{ {

View File

@ -12,7 +12,7 @@ namespace AntDesign
{ {
public class Component : ComponentBase public class Component : ComponentBase
{ {
static Assembly _antAssembly; private static Assembly _antAssembly;
[Parameter] [Parameter]
public Type Type { get; set; } public Type Type { get; set; }

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,6 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,6 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,7 @@
 // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign namespace AntDesign
{ {
public class OnResizeEventArgs public class OnResizeEventArgs

View File

@ -31,13 +31,12 @@ namespace AntDesign
// By implementing IHandleEvent, we can override the event handling logic on a per-handler basis // By implementing IHandleEvent, we can override the event handling logic on a per-handler basis
// The logic here just calls the callback without triggering any re-rendering // The logic here just calls the callback without triggering any re-rendering
class ReceiverBase : IHandleEvent private class ReceiverBase : IHandleEvent
{ {
public Task HandleEventAsync(EventCallbackWorkItem item, object arg) => item.InvokeAsync(arg); public Task HandleEventAsync(EventCallbackWorkItem item, object arg) => item.InvokeAsync(arg);
} }
private sealed class SyncReceiver : ReceiverBase
class SyncReceiver : ReceiverBase
{ {
private Action callback; private Action callback;
@ -49,7 +48,7 @@ namespace AntDesign
public void Invoke() => callback(); public void Invoke() => callback();
} }
class SyncReceiver<T> : ReceiverBase private sealed class SyncReceiver<T> : ReceiverBase
{ {
private Action<T> callback; private Action<T> callback;
@ -61,7 +60,7 @@ namespace AntDesign
public void Invoke(T arg) => callback(arg); public void Invoke(T arg) => callback(arg);
} }
class AsyncReceiver : ReceiverBase private sealed class AsyncReceiver : ReceiverBase
{ {
private Func<Task> callback; private Func<Task> callback;
@ -73,7 +72,7 @@ namespace AntDesign
public Task Invoke() => callback(); public Task Invoke() => callback();
} }
class AsyncReceiver<T>: ReceiverBase private sealed class AsyncReceiver<T> : ReceiverBase
{ {
private Func<T, Task> callback; private Func<T, Task> callback;

View File

@ -1,4 +1,8 @@
using System.Runtime.CompilerServices; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.CompilerServices;
namespace AntDesign.core.Extensions namespace AntDesign.core.Extensions
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Net.Http; using System.Net.Http;
using System.Text; using System.Text;
using System.Text.Json; using System.Text.Json;

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;

View File

@ -2,10 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
namespace AntDesign.Core.Extensions namespace AntDesign.Core.Extensions
{ {
internal static class ObjectExtensions internal static class ObjectExtensions

View File

@ -1,5 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
using System.Collections; // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;

View File

@ -1,4 +1,8 @@
using System.Globalization; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Globalization;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text.Encodings.Web; using System.Text.Encodings.Web;
using AntDesign; using AntDesign;

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public enum FocusBehavior public enum FocusBehavior
{ {

View File

@ -330,4 +330,4 @@ internal static class ExpressionFormatter
} }
} }
} }
#endif #endif

View File

@ -48,4 +48,4 @@ internal class HtmlFieldPrefix(LambdaExpression initial)
return ExpressionFormatter.FormatLambda(expression, prefix); return ExpressionFormatter.FormatLambda(expression, prefix);
} }
} }
#endif #endif

View File

@ -1,4 +1,8 @@
namespace AntDesign.Forms // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign.Forms
{ {
public interface IControlValueAccessor public interface IControlValueAccessor
{ {

View File

@ -170,4 +170,4 @@ internal ref struct ReverseStringBuilder
} }
} }
} }
#endif #endif

View File

@ -1,4 +1,8 @@
using Microsoft.AspNetCore.Components; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign
{ {
@ -18,4 +22,4 @@ namespace AntDesign
_current = value; _current = value;
} }
} }
} }

View File

@ -1,10 +1,14 @@
namespace AntDesign.Core.HashCodes // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign.Core.HashCodes
{ {
/// <summary> /// <summary>
/// Provides a hash comparison of two parameter values /// Provides a hash comparison of two parameter values
/// </summary> /// </summary>
/// <typeparam name="TParameter"></typeparam> /// <typeparam name="TParameter"></typeparam>
static class HashCode<TParameter> internal static class HashCode<TParameter>
{ {
private static readonly HashCodeProvider _provider = HashCodeProvider.Create(typeof(TParameter)); private static readonly HashCodeProvider _provider = HashCodeProvider.Create(typeof(TParameter));

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace AntDesign.Core.HashCodes namespace AntDesign.Core.HashCodes

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Reflection; using System.Reflection;

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Globalization; using System.Globalization;
namespace AntDesign namespace AntDesign

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using System.Linq.Expressions; using System.Linq.Expressions;

View File

@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements. // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Reflection; using System.Reflection;

View File

@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements. // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System; using System;

View File

@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements. // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign.Core.Helpers.MemberPath namespace AntDesign.Core.Helpers.MemberPath
{ {

View File

@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements. // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign.Core.Helpers.MemberPath namespace AntDesign.Core.Helpers.MemberPath
{ {

View File

@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements. // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System; using System;
using System.Linq.Expressions; using System.Linq.Expressions;

View File

@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements. // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;

View File

@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements. // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System; using System;

View File

@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements. // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign.Core.Helpers.MemberPath namespace AntDesign.Core.Helpers.MemberPath
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System.Collections.Generic; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public static class StyleHelper public static class StyleHelper
{ {

View File

@ -1,4 +1,8 @@
using System.Collections.Generic; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.ExceptionServices; using System.Runtime.ExceptionServices;

View File

@ -1,4 +1,8 @@
using System.Threading.Tasks; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace AntDesign namespace AntDesign
@ -41,4 +45,4 @@ namespace AntDesign
} }
} }
} }
} }

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text.Json; using System.Text.Json;

View File

@ -1,4 +1,8 @@
using Microsoft.JSInterop; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.JSInterop;
namespace AntDesign.JsInterop namespace AntDesign.JsInterop
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;

View File

@ -1,4 +1,8 @@
using System.Text.Json.Serialization; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
namespace AntDesign.JsInterop namespace AntDesign.JsInterop
{ {

View File

@ -1,4 +1,8 @@
namespace AntDesign.core.JsInterop.EventArg // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign.core.JsInterop.EventArg
{ {
public class MouseEvent public class MouseEvent
{ {

View File

@ -1,4 +1,8 @@
using System.Text.Json.Serialization; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
namespace AntDesign.JsInterop namespace AntDesign.JsInterop
{ {

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.JSInterop; using Microsoft.JSInterop;

View File

@ -1,4 +1,8 @@
using System; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace AntDesign namespace AntDesign
{ {

View File

@ -1,4 +1,8 @@
using System.Text.Json.Serialization; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
namespace AntDesign.Core.JsInterop.ObservableApi namespace AntDesign.Core.JsInterop.ObservableApi
{ {

View File

@ -1,4 +1,8 @@
using System.Text.Json.Serialization; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
using AntDesign.JsInterop; using AntDesign.JsInterop;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;

View File

@ -1,4 +1,8 @@
using System.Text.Json.Serialization; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
namespace AntDesign.JsInterop namespace AntDesign.JsInterop
{ {

View File

@ -1,4 +1,8 @@
using System.Globalization; // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Globalization;
namespace AntDesign.Core.JsInterop.Modules.Components namespace AntDesign.Core.JsInterop.Modules.Components
{ {

View File

@ -1,4 +1,8 @@
namespace AntDesign // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace AntDesign
{ {
public class Point public class Point
{ {

Some files were not shown because too many files have changed in this diff Show More