mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-11-29 10:38:18 +08:00
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:
parent
eb5b19ac59
commit
9fa391449a
@ -53,6 +53,8 @@ dotnet_style_qualification_for_event = false:refactoring
|
||||
# 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_member_access = true:suggestion
|
||||
# Always add accessibility modifiers
|
||||
dotnet_style_require_accessibility_modifiers=always:warning
|
||||
|
||||
# Suggest more modern language features when available
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
@ -232,23 +234,32 @@ dotnet_diagnostic.CS8509.severity = error
|
||||
# CA2007: Consider calling ConfigureAwait on the awaited task
|
||||
dotnet_diagnostic.CA2007.severity = none
|
||||
|
||||
# CA2227: 集合属性应为只读
|
||||
# CA2227: 集合属性应为只读
|
||||
dotnet_diagnostic.CA2227.severity = none
|
||||
|
||||
# CA1303: 请不要将文本作为本地化参数传递
|
||||
# CA1303: 请不要将文本作为本地化参数传递
|
||||
dotnet_diagnostic.CA1303.severity = none
|
||||
|
||||
# CA2208: 正确实例化参数异常
|
||||
# CA2208: 正确实例化参数异常
|
||||
dotnet_diagnostic.CA2208.severity = none
|
||||
|
||||
# CA1819: 属性不应返回数组
|
||||
# CA1819: 属性不应返回数组
|
||||
dotnet_diagnostic.CA1819.severity = none
|
||||
|
||||
# CA2225: 运算符重载具有命名的备用项
|
||||
# CA2225: 运算符重载具有命名的备用项
|
||||
dotnet_diagnostic.CA2225.severity = none
|
||||
|
||||
# CA1308: 将字符串规范化为大写
|
||||
# CA1308: 将字符串规范化为大写
|
||||
dotnet_diagnostic.CA1308.severity = none
|
||||
|
||||
# CA1040: 避免使用空接口
|
||||
dotnet_diagnostic.CA1040.severity = none
|
||||
# CA1040: 避免使用空接口
|
||||
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
|
||||
|
@ -1,7 +1,6 @@
|
||||
// This file is used by Code Analysis to maintain SuppressMessage
|
||||
// attributes that are applied to this project.
|
||||
// Project-level suppressions either have no target or are given
|
||||
// a specific target and scoped to a namespace, type, member, etc.
|
||||
// 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.Diagnostics.CodeAnalysis;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.Web;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.Web;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AntDesign
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign.Internal
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign
|
||||
|
@ -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>
|
||||
{
|
||||
|
@ -3,12 +3,12 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using AntDesign.Internal;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using AntDesign.Internal;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AntDesign
|
||||
{
|
||||
|
@ -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.Linq;
|
||||
using AntDesign.Internal;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -2,10 +2,7 @@
|
||||
// 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.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace AntDesign
|
||||
{
|
||||
|
@ -2,10 +2,6 @@
|
||||
// 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.Text;
|
||||
|
||||
namespace AntDesign.Internal
|
||||
{
|
||||
public interface ICheckboxGroup
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 Microsoft.AspNetCore.Components;
|
||||
|
||||
|
@ -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 Microsoft.JSInterop;
|
||||
|
||||
|
@ -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>
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.Threading.Tasks;
|
||||
using AntDesign.Core.Extensions;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using AntDesign.Core.Extensions;
|
||||
|
||||
namespace AntDesign
|
||||
{
|
||||
@ -109,7 +113,7 @@ namespace AntDesign
|
||||
/// </summary>
|
||||
/// <param name="target">Element that will receive focus.</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);
|
||||
|
||||
/// <summary>
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.Generic;
|
||||
using System.Globalization;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.Diagnostics;
|
||||
using System.Text.Json;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -2,8 +2,6 @@
|
||||
// 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
|
||||
{
|
||||
public class FormValidateErrorMessages
|
||||
|
@ -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.Runtime.CompilerServices;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace AntDesign
|
||||
{
|
||||
public class Component : ComponentBase
|
||||
{
|
||||
static Assembly _antAssembly;
|
||||
private static Assembly _antAssembly;
|
||||
|
||||
[Parameter]
|
||||
public Type Type { get; set; }
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
public class OnResizeEventArgs
|
||||
|
@ -31,13 +31,12 @@ namespace AntDesign
|
||||
|
||||
// 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
|
||||
class ReceiverBase : IHandleEvent
|
||||
private class ReceiverBase : IHandleEvent
|
||||
{
|
||||
public Task HandleEventAsync(EventCallbackWorkItem item, object arg) => item.InvokeAsync(arg);
|
||||
}
|
||||
|
||||
|
||||
class SyncReceiver : ReceiverBase
|
||||
private sealed class SyncReceiver : ReceiverBase
|
||||
{
|
||||
private Action callback;
|
||||
|
||||
@ -49,7 +48,7 @@ namespace AntDesign
|
||||
public void Invoke() => callback();
|
||||
}
|
||||
|
||||
class SyncReceiver<T> : ReceiverBase
|
||||
private sealed class SyncReceiver<T> : ReceiverBase
|
||||
{
|
||||
private Action<T> callback;
|
||||
|
||||
@ -61,7 +60,7 @@ namespace AntDesign
|
||||
public void Invoke(T arg) => callback(arg);
|
||||
}
|
||||
|
||||
class AsyncReceiver : ReceiverBase
|
||||
private sealed class AsyncReceiver : ReceiverBase
|
||||
{
|
||||
private Func<Task> callback;
|
||||
|
||||
@ -73,7 +72,7 @@ namespace AntDesign
|
||||
public Task Invoke() => callback();
|
||||
}
|
||||
|
||||
class AsyncReceiver<T>: ReceiverBase
|
||||
private sealed class AsyncReceiver<T> : ReceiverBase
|
||||
{
|
||||
private Func<T, Task> callback;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -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.Text;
|
||||
using System.Text.Json;
|
||||
|
@ -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.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
@ -2,10 +2,6 @@
|
||||
// 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.Text;
|
||||
|
||||
namespace AntDesign.Core.Extensions
|
||||
{
|
||||
internal static class ObjectExtensions
|
||||
|
@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
// 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.Linq;
|
||||
|
||||
|
@ -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.Text.Encodings.Web;
|
||||
using AntDesign;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -330,4 +330,4 @@ internal static class ExpressionFormatter
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -48,4 +48,4 @@ internal class HtmlFieldPrefix(LambdaExpression initial)
|
||||
return ExpressionFormatter.FormatLambda(expression, prefix);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -170,4 +170,4 @@ internal ref struct ReverseStringBuilder
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -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
|
||||
{
|
||||
@ -18,4 +22,4 @@ namespace AntDesign
|
||||
_current = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
/// Provides a hash comparison of two parameter values
|
||||
/// </summary>
|
||||
/// <typeparam name="TParameter"></typeparam>
|
||||
static class HashCode<TParameter>
|
||||
internal static class HashCode<TParameter>
|
||||
{
|
||||
private static readonly HashCodeProvider _provider = HashCodeProvider.Create(typeof(TParameter));
|
||||
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign.Core.HashCodes
|
||||
|
@ -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.Generic;
|
||||
|
||||
|
@ -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.Expressions;
|
||||
using System.Reflection;
|
||||
|
@ -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.Linq;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign
|
||||
|
@ -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.Globalization;
|
||||
using System.Linq.Expressions;
|
||||
|
@ -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.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// 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;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// 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.Helpers.MemberPath
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
// 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.Helpers.MemberPath
|
||||
{
|
||||
|
@ -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.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// 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;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// 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;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// 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.Helpers.MemberPath
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign
|
||||
|
@ -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.Diagnostics;
|
||||
using System.Runtime.ExceptionServices;
|
||||
|
@ -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;
|
||||
|
||||
namespace AntDesign
|
||||
@ -41,4 +45,4 @@ namespace AntDesign
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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.Linq;
|
||||
using System.Text.Json;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.Generic;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -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 Microsoft.JSInterop;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 Microsoft.AspNetCore.Components;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user