Skip to content

Commit

Permalink
Added System.Polyfills and updated licenses
Browse files Browse the repository at this point in the history
Enhanced compatibility by adding the System.Polyfills package to both the sample and core projects. Introduced an unambiguous timestamp format for licensing metadata, extending the copyright duration in the LICENSE.md files. Additionally, the StringSyntaxAttribute from System.Diagnostics.CodeAnalysis is now utilized, aligning attribute declaration with .NET 7.0 or greater condition for regex constant validation.

Resolves compatibility and expressive clarity in documentation.
  • Loading branch information
dgmjr committed Feb 21, 2024
1 parent 4987426 commit c692c8b
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 16 deletions.
1 change: 1 addition & 0 deletions Samples/Dgmjr.RegexDtoGenerator.Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<ItemGroup>
<PackageReference Include="System.Threading.Tasks.Extensions" VersionOverride="[4.5.4,)" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="System.Polyfills" />

<PackageReference Include="Dgmjr.RegexDtoGenerator" IncludeAssets="Analyzers;Build" ExcludeAssets="Native;BuildTransitive;BuildMultitargeting;ContentFiles;Compile;Runtime" PrivateAssets="All" />
</ItemGroup>
Expand Down
35 changes: 35 additions & 0 deletions Samples/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
date: 2023-07-13T05:44:46:00-05:00Z
description: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, yadda, yadda, yadda...
keywords:
- IP
- copyright
- license
- mit
permissions:
- commercial-use
- modifications
- distribution
- private-use
conditions:
- include-copyright
limitations:
- liability
- warranty
lastmod: 2024-01-0T00:39:00.0000+05:00Z
license: MIT
slug: mit-license
title: MIT License
type: license
---

# MIT License

## Copyright © 2022-2024 [David G. Moore, Jr.](mailto:[email protected] "Send Dr. Moore") ([@dgmjr](https://github.com/dgmjr "Contact Dr. Moore on GitHub")), All Rights Reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2 changes: 1 addition & 1 deletion src/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ namespace {{ namespace_name }}
{
const RegexOptions RegexOptions = (RegexOptions)({{ regex_options | string.replace "," " | " }});
/// <summary>The regex string that will be used to validate and recognize the DTO</summary>
#if NET7_0_OR_GREATER
[@StringSyntax(StringSyntax.Regex)]
#endif
/// <summary>The regex string that will be used to validate and recognize the DTO</summary>
public const string RegexString = @"{{ regex }}";
// #if NET7_0_OR_GREATER
Expand Down
1 change: 1 addition & 0 deletions src/Dgmjr.RegexDtoGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<PackageReference Include="System.Text.Json" />
<PackageReference Include="ThisAssembly.AssemblyInfo" />
<PackageReference Include="ThisAssembly.Project" />
<PackageReference Include="System.Polyfills" />
<PackageReference Include="System.Text.RegularExpressions.Usings" IncludeAssets="Build;BuildTransitive;BuildMultitargeting;Runtime;Compile" ExcludeAssets="ContentFiles;Native;Analyzers" PrivateAssets="None" />
<PackageReference Include="System.Usings" IncludeAssets="Build;BuildTransitive;BuildMultitargeting;Runtime;Compile" ExcludeAssets="ContentFiles;Native;Analyzers" PrivateAssets="None" />
<!-- <PackageReference Include="System.Private.CoreLib.Polyfills" IncludeAssets="ContentFiles;Build;BuildTransitive;BuildMultitargeting" ExcludeAssets="Analyzers;Runtime;Native" PrivateAssets="All" /> -->
Expand Down
2 changes: 1 addition & 1 deletion src/Dgmjr.RegexDtoGenerator.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<ItemGroup>
<!-- <Using Include="System.Diagnostics.CodeAnalysis.StringSyntaxAttribute" Alias="@StringSyntax" /> -->
<Using Include="System.Diagnostics.CodeAnalysis.StringSyntaxAttribute" Alias="@StringSyntax" />
</ItemGroup>
</Project>
28 changes: 14 additions & 14 deletions src/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
date: 2023-07-13T05:44:46:00.048Z
date: 2023-07-13T05:44:46:00-05:00Z
description: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, yadda, yadda, yadda...
keywords:
- IP
- copyright
- license
- mit
- IP
- copyright
- license
- mit
permissions:
- commercial-use
- modifications
- distribution
- private-use
- commercial-use
- modifications
- distribution
- private-use
conditions:
- include-copyright
- include-copyright
limitations:
- liability
- warranty
lastmod: 2023-08-29T17:13:51:00.216Z
- liability
- warranty
lastmod: 2024-01-0T00:39:00.0000+05:00Z
license: MIT
slug: mit-license
title: MIT License
Expand All @@ -25,7 +25,7 @@ type: license

# MIT License

## Copyright © 2022-2023 [David G. Moore, Jr.](mailto:[email protected] "Send David an email") ([@dgmjr](https://github.com/dgmjr "Contact david on GitHub")), All Rights Reserved
## Copyright © 2022-2024 [David G. Moore, Jr.](mailto:[email protected] "Send Dr. Moore") ([@dgmjr](https://github.com/dgmjr "Contact Dr. Moore on GitHub")), All Rights Reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down

0 comments on commit c692c8b

Please sign in to comment.