Skip to content

Commit

Permalink
Renamed ExcludeProps to IgnoredProperties in AutoDtoAttribute c…
Browse files Browse the repository at this point in the history
…lasses

Renamed the property `ExcludeProps` to `IgnoredProperties` in both `AutoDtoAttribute` and `AutoDtoAttribute<T>` 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<T>` attributes.
  • Loading branch information
vipwan committed Mar 6, 2024
1 parent 9fddbde commit 7d37e16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Biwen.AutoClassGen.Attributes/AutoDtoAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public class AutoDtoAttribute : Attribute
/// </summary>
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;
}
}

Expand All @@ -32,7 +32,7 @@ public AutoDtoAttribute(Type fromType, params string[] excludeProps)
public class AutoDtoAttribute<T> : 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)
{
}
}
Expand Down
4 changes: 2 additions & 2 deletions Gen-Dto.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(params string[] escapeCols)]
[AutoDto<T>(params string[] ignoredProperties)]

```

Expand Down

0 comments on commit 7d37e16

Please sign in to comment.