From 7d37e161e5dad8c57e77eddab0329de143cf5f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E9=9B=85=E8=99=8E?= Date: Wed, 6 Mar 2024 15:55:35 +0800 Subject: [PATCH] Renamed `ExcludeProps` to `IgnoredProperties` in `AutoDtoAttribute` classes Renamed the property `ExcludeProps` to `IgnoredProperties` in both `AutoDtoAttribute` and `AutoDtoAttribute` classes. This change is also reflected in the constructors of these classes, where the parameter `excludeProps` has been renamed to `ignoredProperties`. Updated the `Gen-Dto.md` file to reflect these changes in the usage instructions for the `AutoDto` and `AutoDto` attributes. --- Biwen.AutoClassGen.Attributes/AutoDtoAttribute.cs | 8 ++++---- Gen-Dto.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Biwen.AutoClassGen.Attributes/AutoDtoAttribute.cs b/Biwen.AutoClassGen.Attributes/AutoDtoAttribute.cs index 8a02baf..8f1fb36 100644 --- a/Biwen.AutoClassGen.Attributes/AutoDtoAttribute.cs +++ b/Biwen.AutoClassGen.Attributes/AutoDtoAttribute.cs @@ -13,12 +13,12 @@ public class AutoDtoAttribute : Attribute /// public Type FromType { get; private set; } - public string[] ExcludeProps { get; private set; } + public string[] IgnoredProperties { get; private set; } - public AutoDtoAttribute(Type fromType, params string[] excludeProps) + public AutoDtoAttribute(Type fromType, params string[] ignoredProperties) { FromType = fromType; - ExcludeProps = excludeProps; + IgnoredProperties = ignoredProperties; } } @@ -32,7 +32,7 @@ public AutoDtoAttribute(Type fromType, params string[] excludeProps) public class AutoDtoAttribute : AutoDtoAttribute where T : class #pragma warning restore SA1402 // File may only contain a single type { - public AutoDtoAttribute(params string[] excludeProps) : base(typeof(T), excludeProps) + public AutoDtoAttribute(params string[] ignoredProperties) : base(typeof(T), ignoredProperties) { } } diff --git a/Gen-Dto.md b/Gen-Dto.md index b136c46..db2d23a 100644 --- a/Gen-Dto.md +++ b/Gen-Dto.md @@ -2,10 +2,10 @@ ```c# //netstandard2.0 + -[AutoDto(Type entityType ,params string[] escapeCols)] +[AutoDto(Type entityType ,params string[] ignoredProperties)] //C#11(NET7+) support generic attribute -[AutoDto(params string[] escapeCols)] +[AutoDto(params string[] ignoredProperties)] ```