From 26e73613416f389fbe9ac058ef30f9f26b068639 Mon Sep 17 00:00:00 2001 From: Anthony Simmon Date: Tue, 10 Jan 2023 17:37:01 -0500 Subject: [PATCH 1/9] GSoft rebranding --- .editorconfig | 2 + .gitattributes | 1 + .github/CODEOWNERS | 1 + .github/ISSUE_TEMPLATE/bug_report.md | 32 ++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 20 ++ .github/dependabot.yml | 11 ++ .github/workflows/ci.yml | 23 +-- .github/workflows/codeql.yml | 35 ++++ .github/workflows/publish.yml | 25 +++ .github/workflows/release.yml | 29 --- .gitignore | 9 +- CONTRIBUTING.md | 3 + GitVersion.yml | 94 ++++++++++ README.md | 10 +- SECURITY.md | 3 + build.sh | 1 - build/Build.csproj | 14 -- build/Program.cs | 176 ------------------ global.json | 7 + src/.editorconfig | 3 +- src/Directory.Build.props | 30 ++- .../ContainsAttributeTests.cs | 2 +- .../EndsWithAttributeTests.cs | 2 +- ...mponentModel.DataAnnotations.Tests.csproj} | 22 ++- .../GuidAttributeTests.cs | 2 +- .../NotEmptyAttributeTests.cs | 2 +- .../StartsWithAttributeTests.cs | 2 +- .../StringExtensions.cs | 2 +- .../TimeSpanAttributeTests.cs | 2 +- .../UrlOfKindAttributeTests.cs | 2 +- .../ValidatePropertiesAttributeTests.cs | 2 +- ... GSoft.ComponentModel.DataAnnotations.sln} | 4 +- ... GSoft.ComponentModel.DataAnnotations.snk} | Bin .../ContainsAttribute.cs | 2 +- .../EndsWithAttribute.cs | 2 +- ...Soft.ComponentModel.DataAnnotations.csproj | 34 ++++ .../GuidAttribute.cs | 2 +- .../NonSensitiveInformationAttribute.cs | 2 +- .../NotEmptyAttribute.cs | 2 +- .../PropertiesValidationResult.cs | 2 +- .../ProvidedByAzureAppConfigAttribute.cs | 2 +- .../ProvidedByAzureKeyVaultAttribute.cs | 2 +- .../PublicAPI.Shipped.txt | 48 +++++ .../PublicAPI.Unshipped.txt | 1 + .../SensitiveInformationAttribute.cs | 2 +- .../SensitivityScope.cs | 2 +- .../StartsWithAttribute.cs | 2 +- .../TextBasedValidationAttribute.cs | 2 +- .../TimeSpanAttribute.cs | 2 +- .../UrlOfKindAttribute.cs | 2 +- .../ValidatePropertiesAttribute.cs | 2 +- .../AssemblyProperties.cs | 8 - ...Gate.ComponentModel.DataAnnotations.csproj | 22 --- 54 files changed, 397 insertions(+), 320 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/release.yml create mode 100644 CONTRIBUTING.md create mode 100644 GitVersion.yml create mode 100644 SECURITY.md delete mode 100644 build.sh delete mode 100644 build/Build.csproj delete mode 100644 build/Program.cs create mode 100644 global.json rename src/{ShareGate.ComponentModel.DataAnnotations.Tests => GSoft.ComponentModel.DataAnnotations.Tests}/ContainsAttributeTests.cs (94%) rename src/{ShareGate.ComponentModel.DataAnnotations.Tests => GSoft.ComponentModel.DataAnnotations.Tests}/EndsWithAttributeTests.cs (94%) rename src/{ShareGate.ComponentModel.DataAnnotations.Tests/ShareGate.ComponentModel.DataAnnotations.Tests.csproj => GSoft.ComponentModel.DataAnnotations.Tests/GSoft.ComponentModel.DataAnnotations.Tests.csproj} (53%) rename src/{ShareGate.ComponentModel.DataAnnotations.Tests => GSoft.ComponentModel.DataAnnotations.Tests}/GuidAttributeTests.cs (98%) rename src/{ShareGate.ComponentModel.DataAnnotations.Tests => GSoft.ComponentModel.DataAnnotations.Tests}/NotEmptyAttributeTests.cs (98%) rename src/{ShareGate.ComponentModel.DataAnnotations.Tests => GSoft.ComponentModel.DataAnnotations.Tests}/StartsWithAttributeTests.cs (95%) rename src/{ShareGate.ComponentModel.DataAnnotations.Tests => GSoft.ComponentModel.DataAnnotations.Tests}/StringExtensions.cs (79%) rename src/{ShareGate.ComponentModel.DataAnnotations.Tests => GSoft.ComponentModel.DataAnnotations.Tests}/TimeSpanAttributeTests.cs (98%) rename src/{ShareGate.ComponentModel.DataAnnotations.Tests => GSoft.ComponentModel.DataAnnotations.Tests}/UrlOfKindAttributeTests.cs (98%) rename src/{ShareGate.ComponentModel.DataAnnotations.Tests => GSoft.ComponentModel.DataAnnotations.Tests}/ValidatePropertiesAttributeTests.cs (97%) rename src/{ShareGate.ComponentModel.DataAnnotations.sln => GSoft.ComponentModel.DataAnnotations.sln} (75%) rename src/{ShareGate.ComponentModel.DataAnnotations.snk => GSoft.ComponentModel.DataAnnotations.snk} (100%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/ContainsAttribute.cs (91%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/EndsWithAttribute.cs (88%) create mode 100644 src/GSoft.ComponentModel.DataAnnotations/GSoft.ComponentModel.DataAnnotations.csproj rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/GuidAttribute.cs (96%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/NonSensitiveInformationAttribute.cs (81%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/NotEmptyAttribute.cs (94%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/PropertiesValidationResult.cs (89%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/ProvidedByAzureAppConfigAttribute.cs (85%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/ProvidedByAzureKeyVaultAttribute.cs (85%) create mode 100644 src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Shipped.txt create mode 100644 src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Unshipped.txt rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/SensitiveInformationAttribute.cs (91%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/SensitivityScope.cs (88%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/StartsWithAttribute.cs (88%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/TextBasedValidationAttribute.cs (93%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/TimeSpanAttribute.cs (96%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/UrlOfKindAttribute.cs (96%) rename src/{ShareGate.ComponentModel.DataAnnotations => GSoft.ComponentModel.DataAnnotations}/ValidatePropertiesAttribute.cs (98%) delete mode 100644 src/ShareGate.ComponentModel.DataAnnotations/AssemblyProperties.cs delete mode 100644 src/ShareGate.ComponentModel.DataAnnotations/ShareGate.ComponentModel.DataAnnotations.csproj diff --git a/.editorconfig b/.editorconfig index fee44c5..bb9b55f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,3 +1,5 @@ +root = true + [*] indent_style = space charset = utf-8 diff --git a/.gitattributes b/.gitattributes index 7a2a039..2aba43e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12,4 +12,5 @@ *.yml text eol=lf *.yaml text eol=lf *.Dockerfile text eol=lf +Dockerfile text eol=lf LICENSE text eol=lf \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..3eaa631 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @gsoft-inc/tech-platform \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..ed92054 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environment (please complete the following information):** + - OS: [e.g. Windows] + - Version: [e.g. 1.2.3] + - IDE: [e.g. Rider] + - etc. + +**Additional context** +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ec4bb38 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..24473de --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..473ecc8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: "nuget" + directory: "/src" + schedule: + interval: "weekly" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb10ad7..c238fc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,15 +1,11 @@ -name: CI build +name: CI on: - push: - branches: - - master pull_request: - branches: - - master + branches: ["main"] jobs: - build: + main: runs-on: ubuntu-latest steps: @@ -17,16 +13,9 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-dotnet@v2 + - uses: actions/setup-dotnet@v3 with: - dotnet-version: | - 3.1.x - 6.0.x + dotnet-version: "6.0.x" - - run: ./build.ps1 + - run: ./Build.ps1 shell: pwsh - - - uses: actions/upload-artifact@v3 - with: - name: packages - path: ./.output/**/* diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..0a6ad4a --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,35 @@ +name: CodeQL + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + schedule: + - cron: "12 1 * * 0" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: csharp + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:csharp" \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..06e1646 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish + +on: + push: + branches: ["main"] + tags: ["*.*.*"] + +jobs: + main: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: "6.0.x" + + - run: ./Build.ps1 + shell: pwsh + env: + NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }} + NUGET_API_KEY: ${{ secrets.GSOFTINC_NUGET_API_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index ac3c88d..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: NuGet push - -on: - push: - tags: - - "*.*.*" - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - uses: actions/setup-dotnet@v2 - with: - dotnet-version: | - 3.1.x - 6.0.x - - - run: ./build.ps1 --target=push --nuget-api-key=${{ secrets.nuget_api_key }} --nuget-source=${{ secrets.nuget_source }} - shell: pwsh - - - uses: actions/upload-artifact@v3 - with: - name: packages - path: ./.output/**/* \ No newline at end of file diff --git a/.gitignore b/.gitignore index c4f2d30..0ace0bb 100644 --- a/.gitignore +++ b/.gitignore @@ -375,7 +375,7 @@ FodyWeavers.xsd *.msm *.msp -# JetBrains Rider +# JetBrains IDEs .idea/ *.sln.iml @@ -386,8 +386,5 @@ ehthumbs.db Thumbs.db $RECYCLE.BIN/ -# Cake -build/tools/** -!build/tools/packages.config - -.output/ \ No newline at end of file +# Build output +/.output/ \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..cf0be6f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,3 @@ +# Contributing + +We do not accept external pull requests yet. \ No newline at end of file diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000..7fb12de --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,94 @@ +assembly-versioning-scheme: MajorMinorPatch +assembly-file-versioning-scheme: MajorMinorPatch +assembly-informational-format: "{InformationalVersion}" +mode: ContinuousDelivery +increment: Inherit +continuous-delivery-fallback-tag: ci +tag-prefix: "[vV]" +major-version-bump-message: '\+semver:\s?(breaking|major)' +minor-version-bump-message: '\+semver:\s?(feature|minor)' +patch-version-bump-message: '\+semver:\s?(fix|patch)' +no-bump-message: '\+semver:\s?(none|skip)' +legacy-semver-padding: 4 +build-metadata-padding: 4 +commits-since-version-source-padding: 4 +tag-pre-release-weight: 60000 +commit-message-incrementing: Enabled +update-build-number: true + +branches: + main: + regex: ^(master|main)$ + mode: ContinuousDeployment + tag: preview + increment: Patch + prevent-increment-of-merged-branch-version: true + track-merge-target: false + source-branches: ["develop", "release"] + tracks-release-branches: false + is-release-branch: false + is-mainline: true + pre-release-weight: 55000 + develop: + regex: ^dev(elop)?(ment)?$ + mode: ContinuousDeployment + tag: alpha + increment: Minor + prevent-increment-of-merged-branch-version: false + track-merge-target: true + source-branches: [] + tracks-release-branches: true + is-release-branch: false + is-mainline: false + pre-release-weight: 0 + release: + regex: ^releases?[/-] + mode: ContinuousDelivery + tag: beta + increment: None + prevent-increment-of-merged-branch-version: true + track-merge-target: false + source-branches: ["develop", "main", "support", "release"] + tracks-release-branches: false + is-release-branch: true + is-mainline: false + pre-release-weight: 30000 + feature: + regex: ^features?[/-] + mode: ContinuousDelivery + tag: useBranchName + increment: Inherit + prevent-increment-of-merged-branch-version: false + track-merge-target: false + source-branches: + ["develop", "main", "release", "feature", "support", "hotfix"] + tracks-release-branches: false + is-release-branch: false + is-mainline: false + pre-release-weight: 30000 + pull-request: + regex: ^(pull|pull\-requests|pr)[/-] + mode: ContinuousDelivery + tag: PullRequest + increment: Inherit + prevent-increment-of-merged-branch-version: false + tag-number-pattern: '[/-](?\d+)[-/]' + track-merge-target: false + source-branches: + ["develop", "main", "release", "feature", "support", "hotfix"] + tracks-release-branches: false + is-release-branch: false + is-mainline: false + pre-release-weight: 30000 + hotfix: + regex: ^hotfix(es)?[/-] + mode: ContinuousDelivery + tag: beta + increment: Patch + prevent-increment-of-merged-branch-version: false + track-merge-target: false + source-branches: ["develop", "main", "support"] + tracks-release-branches: false + is-release-branch: false + is-mainline: false + pre-release-weight: 30000 \ No newline at end of file diff --git a/README.md b/README.md index efb438f..1958f68 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# ShareGate.ComponentModel.DataAnnotations +# GSoft.ComponentModel.DataAnnotations Provides multiple new data annotation attributes, such as `[Guid]`, `[NotEmpty]`, `[ValidateProperties]`. -[![nuget](https://img.shields.io/nuget/v/ShareGate.ComponentModel.DataAnnotations.svg?logo=nuget)](https://www.nuget.org/packages/ShareGate.ComponentModel.DataAnnotations/) -[![build](https://img.shields.io/github/workflow/status/gsoft-inc/sg-componentmodel-dataannotations/CI%20build?logo=github)](https://github.com/gsoft-inc/sg-componentmodel-dataannotations/actions/workflows/ci.yml) +[![nuget](https://img.shields.io/nuget/v/GSoft.ComponentModel.DataAnnotations.svg?logo=nuget)](https://www.nuget.org/packages/GSoft.ComponentModel.DataAnnotations/) +[![build](https://img.shields.io/github/actions/workflow/status/gsoft-inc/gsoft-componentmodel-dataannotations/publish.yml?logo=github)](https://github.com/gsoft-inc/gsoft-componentmodel-dataannotations/actions/workflows/publish.yml) ## Getting started ``` -dotnet add package ShareGate.ComponentModel.DataAnnotations +dotnet add package GSoft.ComponentModel.DataAnnotations ``` Decorate your properties, fields and method parameters with these new data annotation attributes. @@ -42,4 +42,4 @@ Pull requests are welcome. For major changes, please open an issue first to disc ## License -Copyright © 2022, GSoft inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/sharegate-license/blob/master/LICENSE. +Copyright © 2022, GSoft inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/gsoft-license/blob/master/LICENSE. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e7a1f94 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,3 @@ +# Security Policy + +If you'd like to report a vulnerability, please open a [GitHub issue](https://github.com/gsoft-inc/gsoft-componentmodel-dataannotations/issues). diff --git a/build.sh b/build.sh deleted file mode 100644 index dfd6b85..0000000 --- a/build.sh +++ /dev/null @@ -1 +0,0 @@ -dotnet run --project ./build/Build.csproj -- "$@" diff --git a/build/Build.csproj b/build/Build.csproj deleted file mode 100644 index c66d32e..0000000 --- a/build/Build.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - Exe - net6.0 - $(MSBuildProjectDirectory) - True - enable - 10 - - - - - - \ No newline at end of file diff --git a/build/Program.cs b/build/Program.cs deleted file mode 100644 index c9b4411..0000000 --- a/build/Program.cs +++ /dev/null @@ -1,176 +0,0 @@ -using System; -using System.IO; -using Cake.Common; -using Cake.Common.Build; -using Cake.Common.IO; -using Cake.Common.Tools.DotNet; -using Cake.Common.Tools.DotNet.Build; -using Cake.Common.Tools.DotNet.MSBuild; -using Cake.Common.Tools.DotNet.NuGet.Push; -using Cake.Common.Tools.DotNet.Pack; -using Cake.Common.Tools.DotNet.Restore; -using Cake.Common.Tools.DotNet.Test; -using Cake.Common.Tools.GitVersion; -using Cake.Core; -using Cake.Core.Diagnostics; -using Cake.Frosting; - -return new CakeHost() - .InstallTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.10.1")) - .UseContext() - .Run(args); - -public static class Constants -{ - public const string Release = "Release"; - public const string ProjectName = "ShareGate.ComponentModel.DataAnnotations"; - - public static readonly string SourceDirectoryPath = Path.Combine("..", "src"); - public static readonly string OutputDirectoryPath = Path.Combine("..", ".output"); - public static readonly string SolutionPath = Path.Combine(SourceDirectoryPath, ProjectName + ".sln"); - public static readonly string MainProjectPath = Path.Combine(SourceDirectoryPath, ProjectName, ProjectName + ".csproj"); -} - -public class BuildContext : FrostingContext -{ - public BuildContext(ICakeContext context) : base(context) - { - this.NugetApiKey = context.Argument("nuget-api-key", string.Empty); - this.NugetSource = context.Argument("nuget-source", string.Empty); - } - - public DotNetMSBuildSettings MSBuildSettings { get; } = new DotNetMSBuildSettings(); - - public string NugetApiKey { get; } - - public string NugetSource { get; } - - public void AddMSBuildSetting(string name, string value, bool log = false) - { - if (log) - { - this.Log.Information(name + ": " + value); - } - - if (!string.IsNullOrWhiteSpace(value)) - { - this.MSBuildSettings.Properties[name] = new[] { value }; - } - } -} - -[TaskName("Clean")] -public sealed class CleanTask : FrostingTask -{ - public override void Run(BuildContext context) - { - var objGlobPath = Path.Combine(Constants.SourceDirectoryPath, "*", "obj"); - var binGlobPath = Path.Combine(Constants.SourceDirectoryPath, "*", "bin"); - - context.CleanDirectories(Constants.OutputDirectoryPath); - context.CleanDirectories(objGlobPath); - context.CleanDirectories(binGlobPath); - } -} - -[TaskName("GitVersion")] -public sealed class GitVersionTask : FrostingTask -{ - public override void Run(BuildContext context) - { - var gitVersion = context.GitVersion(); - - context.AddMSBuildSetting("Version", gitVersion.NuGetVersion, log: true); - context.AddMSBuildSetting("VersionPrefix", gitVersion.MajorMinorPatch, log: true); - context.AddMSBuildSetting("VersionSuffix", gitVersion.PreReleaseTag, log: true); - context.AddMSBuildSetting("PackageVersion", gitVersion.FullSemVer, log: true); - context.AddMSBuildSetting("InformationalVersion", gitVersion.InformationalVersion, log: true); - context.AddMSBuildSetting("AssemblyVersion", gitVersion.AssemblySemVer, log: true); - context.AddMSBuildSetting("FileVersion", gitVersion.AssemblySemFileVer, log: true); - context.AddMSBuildSetting("RepositoryBranch", gitVersion.BranchName, log: true); - context.AddMSBuildSetting("RepositoryCommit", gitVersion.Sha, log: true); - } -} - -[TaskName("Restore")] -[IsDependentOn(typeof(CleanTask))] -[IsDependentOn(typeof(GitVersionTask))] -public sealed class RestoreTask : FrostingTask -{ - public override void Run(BuildContext context) => context.DotNetRestore(Constants.SolutionPath, new DotNetRestoreSettings - { - MSBuildSettings = context.MSBuildSettings, - }); -} - -[TaskName("Build")] -[IsDependentOn(typeof(RestoreTask))] -public sealed class BuildTask : FrostingTask -{ - public override void Run(BuildContext context) - { - context.AddMSBuildSetting("Deterministic", "true"); - context.AddMSBuildSetting("ContinuousIntegrationBuild", "true"); - - context.DotNetBuild(Constants.SolutionPath, new DotNetBuildSettings - { - Configuration = Constants.Release, - MSBuildSettings = context.MSBuildSettings, - NoRestore = true, - NoLogo = true, - }); - } -} - -[TaskName("Test")] -[IsDependentOn(typeof(BuildTask))] -public sealed class TestTask : FrostingTask -{ - public override void Run(BuildContext context) => context.DotNetTest(Constants.SolutionPath, new DotNetTestSettings - { - Configuration = Constants.Release, - Loggers = new[] { "console;verbosity=detailed", "trx" }, - ResultsDirectory = Constants.OutputDirectoryPath, - NoBuild = true, - NoLogo = true, - }); -} - -[TaskName("Pack")] -[IsDependentOn(typeof(TestTask))] -public sealed class PackTask : FrostingTask -{ - public override void Run(BuildContext context) => context.DotNetPack(Constants.MainProjectPath, new DotNetPackSettings - { - Configuration = Constants.Release, - MSBuildSettings = context.MSBuildSettings, - OutputDirectory = Constants.OutputDirectoryPath, - NoBuild = true, - NoRestore = true, - NoLogo = true, - }); -} - -[TaskName("Push")] -[IsDependentOn(typeof(PackTask))] -public sealed class PushTask : FrostingTask -{ - public override void Run(BuildContext context) - { - foreach (var packageFilePath in context.GetFiles(Path.Combine(Constants.OutputDirectoryPath, "*.nupkg"))) - { - context.DotNetNuGetPush(packageFilePath, new DotNetNuGetPushSettings - { - ApiKey = context.NugetApiKey, - Source = context.NugetSource, - IgnoreSymbols = false - }); - } - } -} - -[TaskName("Default")] -[IsDependentOn(typeof(PackTask))] -public sealed class DefaultTask : FrostingTask -{ -} \ No newline at end of file diff --git a/global.json b/global.json new file mode 100644 index 0000000..d179598 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "6.0.404", + "rollForward": "latestMinor", + "allowPrerelease": false + } +} \ No newline at end of file diff --git a/src/.editorconfig b/src/.editorconfig index 3962c49..7f8f047 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -166,7 +166,7 @@ dotnet_diagnostic.CA2002.severity = warning dotnet_diagnostic.CA2003.severity = none dotnet_diagnostic.CA2004.severity = none dotnet_diagnostic.CA2006.severity = none -dotnet_diagnostic.CA2007.severity = none +dotnet_diagnostic.CA2007.severity = error dotnet_diagnostic.CA2100.severity = warning dotnet_diagnostic.CA2101.severity = none dotnet_diagnostic.CA2102.severity = warning @@ -548,6 +548,7 @@ dotnet_diagnostic.CA1810.severity = none dotnet_diagnostic.CA1819.severity = warning dotnet_diagnostic.CA1822.severity = none dotnet_diagnostic.CA1824.severity = warning +dotnet_diagnostic.CA2007.severity = none dotnet_diagnostic.CA2229.severity = warning dotnet_diagnostic.CA2235.severity = warning dotnet_diagnostic.xUnit1004.severity = none diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 6a62ae3..540e367 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,14 +1,15 @@ - Copyright © Groupe GSoft inc. $([System.DateTime]::UtcNow.ToString(yyyy)) - Anthony Simmon - Groupe GSoft inc. - https://github.com/gsoft-inc/sg-componentmodel-dataannotations + Copyright © GSoft Group Inc. $([System.DateTime]::UtcNow.ToString(yyyy)) + GSoft Group Inc. + GSoft Group Inc. + https://github.com/gsoft-inc/gsoft-componentmodel-dataannotations + true Apache-2.0 10 enable disable - Provides more data annotations. + Provides informational attributes and additional validation attributes that can be used during model binding. @@ -16,9 +17,26 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive + + all + runtime; build; native; contentfiles; analyzers + + + + + + true + + + + + + + + \ No newline at end of file diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs similarity index 94% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs rename to src/GSoft.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs index 3197587..44cef7c 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace ShareGate.ComponentModel.DataAnnotations.Tests; +namespace GSoft.ComponentModel.DataAnnotations.Tests; public class ContainsAttributeTests { diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs similarity index 94% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs rename to src/GSoft.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs index 3b1f844..7cbfd4d 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace ShareGate.ComponentModel.DataAnnotations.Tests; +namespace GSoft.ComponentModel.DataAnnotations.Tests; public class EndsWithAttributeTests { diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/ShareGate.ComponentModel.DataAnnotations.Tests.csproj b/src/GSoft.ComponentModel.DataAnnotations.Tests/GSoft.ComponentModel.DataAnnotations.Tests.csproj similarity index 53% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/ShareGate.ComponentModel.DataAnnotations.Tests.csproj rename to src/GSoft.ComponentModel.DataAnnotations.Tests/GSoft.ComponentModel.DataAnnotations.Tests.csproj index 3e4a5dc..6f17b93 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/ShareGate.ComponentModel.DataAnnotations.Tests.csproj +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/GSoft.ComponentModel.DataAnnotations.Tests.csproj @@ -4,20 +4,24 @@ false true true - ../ShareGate.ComponentModel.DataAnnotations.snk + ../GSoft.ComponentModel.DataAnnotations.snk - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs similarity index 98% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs rename to src/GSoft.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs index cb58441..8b1766a 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using Xunit; -namespace ShareGate.ComponentModel.DataAnnotations.Tests; +namespace GSoft.ComponentModel.DataAnnotations.Tests; public class GuidAttributeTests { diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs similarity index 98% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs rename to src/GSoft.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs index aa5029f..f8e08a3 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs @@ -5,7 +5,7 @@ using System.Globalization; using Xunit; -namespace ShareGate.ComponentModel.DataAnnotations.Tests; +namespace GSoft.ComponentModel.DataAnnotations.Tests; public sealed class NotEmptyAttributeTests { diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs similarity index 95% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs rename to src/GSoft.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs index 7c2123e..23aa69b 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace ShareGate.ComponentModel.DataAnnotations.Tests; +namespace GSoft.ComponentModel.DataAnnotations.Tests; public class StartsWithAttributeTests { diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/StringExtensions.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/StringExtensions.cs similarity index 79% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/StringExtensions.cs rename to src/GSoft.ComponentModel.DataAnnotations.Tests/StringExtensions.cs index 3718711..9905ef1 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/StringExtensions.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/StringExtensions.cs @@ -1,6 +1,6 @@ using System.Globalization; -namespace ShareGate.ComponentModel.DataAnnotations.Tests; +namespace GSoft.ComponentModel.DataAnnotations.Tests; internal static class StringExtensions { diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs similarity index 98% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs rename to src/GSoft.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs index c3af31e..45f6b83 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using Xunit; -namespace ShareGate.ComponentModel.DataAnnotations.Tests; +namespace GSoft.ComponentModel.DataAnnotations.Tests; public class TimeSpanAttributeTests { diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs similarity index 98% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs rename to src/GSoft.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs index a100c85..29f3a69 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using Xunit; -namespace ShareGate.ComponentModel.DataAnnotations.Tests; +namespace GSoft.ComponentModel.DataAnnotations.Tests; public class UrlOfKindAttributeTests { diff --git a/src/ShareGate.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs similarity index 97% rename from src/ShareGate.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs rename to src/GSoft.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs index 1a7640b..8437a14 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using Xunit; -namespace ShareGate.ComponentModel.DataAnnotations.Tests; +namespace GSoft.ComponentModel.DataAnnotations.Tests; public class ValidatePropertiesAttributeTests { diff --git a/src/ShareGate.ComponentModel.DataAnnotations.sln b/src/GSoft.ComponentModel.DataAnnotations.sln similarity index 75% rename from src/ShareGate.ComponentModel.DataAnnotations.sln rename to src/GSoft.ComponentModel.DataAnnotations.sln index a4c21d1..7c20c30 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations.sln +++ b/src/GSoft.ComponentModel.DataAnnotations.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShareGate.ComponentModel.DataAnnotations", "ShareGate.ComponentModel.DataAnnotations\ShareGate.ComponentModel.DataAnnotations.csproj", "{FB8215B8-9EE1-4566-BB13-D8C3BB64F64C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GSoft.ComponentModel.DataAnnotations", "GSoft.ComponentModel.DataAnnotations\GSoft.ComponentModel.DataAnnotations.csproj", "{FB8215B8-9EE1-4566-BB13-D8C3BB64F64C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShareGate.ComponentModel.DataAnnotations.Tests", "ShareGate.ComponentModel.DataAnnotations.Tests\ShareGate.ComponentModel.DataAnnotations.Tests.csproj", "{E226C160-6B01-4B70-AD7C-13AE9390B11E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GSoft.ComponentModel.DataAnnotations.Tests", "GSoft.ComponentModel.DataAnnotations.Tests\GSoft.ComponentModel.DataAnnotations.Tests.csproj", "{E226C160-6B01-4B70-AD7C-13AE9390B11E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "files", "files", "{9B779297-90BB-418A-AA2D-5606C2E93B14}" ProjectSection(SolutionItems) = preProject diff --git a/src/ShareGate.ComponentModel.DataAnnotations.snk b/src/GSoft.ComponentModel.DataAnnotations.snk similarity index 100% rename from src/ShareGate.ComponentModel.DataAnnotations.snk rename to src/GSoft.ComponentModel.DataAnnotations.snk diff --git a/src/ShareGate.ComponentModel.DataAnnotations/ContainsAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/ContainsAttribute.cs similarity index 91% rename from src/ShareGate.ComponentModel.DataAnnotations/ContainsAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/ContainsAttribute.cs index 44d4b78..6806d8d 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/ContainsAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/ContainsAttribute.cs @@ -1,7 +1,7 @@ using System; using System.Diagnostics.CodeAnalysis; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = true)] public sealed class ContainsAttribute : TextBasedValidationAttribute diff --git a/src/ShareGate.ComponentModel.DataAnnotations/EndsWithAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/EndsWithAttribute.cs similarity index 88% rename from src/ShareGate.ComponentModel.DataAnnotations/EndsWithAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/EndsWithAttribute.cs index 5fab1af..3b8fc84 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/EndsWithAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/EndsWithAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)] public sealed class EndsWithAttribute : TextBasedValidationAttribute diff --git a/src/GSoft.ComponentModel.DataAnnotations/GSoft.ComponentModel.DataAnnotations.csproj b/src/GSoft.ComponentModel.DataAnnotations/GSoft.ComponentModel.DataAnnotations.csproj new file mode 100644 index 0000000..1b03e42 --- /dev/null +++ b/src/GSoft.ComponentModel.DataAnnotations/GSoft.ComponentModel.DataAnnotations.csproj @@ -0,0 +1,34 @@ + + + net462;net6.0;netstandard2.0 + True + True + snupkg + GSoft.ComponentModel.DataAnnotations + GSoft.ComponentModel.DataAnnotations + README.md + true + ../GSoft.ComponentModel.DataAnnotations.snk + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + diff --git a/src/ShareGate.ComponentModel.DataAnnotations/GuidAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/GuidAttribute.cs similarity index 96% rename from src/ShareGate.ComponentModel.DataAnnotations/GuidAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/GuidAttribute.cs index 77cf83d..6facf4d 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/GuidAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/GuidAttribute.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Globalization; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)] public sealed class GuidAttribute : ValidationAttribute diff --git a/src/ShareGate.ComponentModel.DataAnnotations/NonSensitiveInformationAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/NonSensitiveInformationAttribute.cs similarity index 81% rename from src/ShareGate.ComponentModel.DataAnnotations/NonSensitiveInformationAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/NonSensitiveInformationAttribute.cs index bd489d9..59267b2 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/NonSensitiveInformationAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/NonSensitiveInformationAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; /// /// Indicates that a property does not contains sensitive information. diff --git a/src/ShareGate.ComponentModel.DataAnnotations/NotEmptyAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/NotEmptyAttribute.cs similarity index 94% rename from src/ShareGate.ComponentModel.DataAnnotations/NotEmptyAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/NotEmptyAttribute.cs index fcfcc8c..1c60b26 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/NotEmptyAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/NotEmptyAttribute.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.Linq; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)] public sealed class NotEmptyAttribute : ValidationAttribute diff --git a/src/ShareGate.ComponentModel.DataAnnotations/PropertiesValidationResult.cs b/src/GSoft.ComponentModel.DataAnnotations/PropertiesValidationResult.cs similarity index 89% rename from src/ShareGate.ComponentModel.DataAnnotations/PropertiesValidationResult.cs rename to src/GSoft.ComponentModel.DataAnnotations/PropertiesValidationResult.cs index d26090a..0f3b8b0 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/PropertiesValidationResult.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/PropertiesValidationResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; internal sealed class PropertiesValidationResult : ValidationResult { diff --git a/src/ShareGate.ComponentModel.DataAnnotations/ProvidedByAzureAppConfigAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/ProvidedByAzureAppConfigAttribute.cs similarity index 85% rename from src/ShareGate.ComponentModel.DataAnnotations/ProvidedByAzureAppConfigAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/ProvidedByAzureAppConfigAttribute.cs index 9dc00f2..85627ad 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/ProvidedByAzureAppConfigAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/ProvidedByAzureAppConfigAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; /// /// This attribute has no effect. Its purpose is to let developers know that a configuration property diff --git a/src/ShareGate.ComponentModel.DataAnnotations/ProvidedByAzureKeyVaultAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/ProvidedByAzureKeyVaultAttribute.cs similarity index 85% rename from src/ShareGate.ComponentModel.DataAnnotations/ProvidedByAzureKeyVaultAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/ProvidedByAzureKeyVaultAttribute.cs index c4abd11..28cec17 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/ProvidedByAzureKeyVaultAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/ProvidedByAzureKeyVaultAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; /// /// This attribute has no effect. Its purpose is to let developers know that a configuration property diff --git a/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Shipped.txt b/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Shipped.txt new file mode 100644 index 0000000..3436e2d --- /dev/null +++ b/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Shipped.txt @@ -0,0 +1,48 @@ +#nullable enable +abstract GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IsValid(string value) -> bool +GSoft.ComponentModel.DataAnnotations.ContainsAttribute +GSoft.ComponentModel.DataAnnotations.ContainsAttribute.ContainsAttribute(string text) -> void +GSoft.ComponentModel.DataAnnotations.EndsWithAttribute +GSoft.ComponentModel.DataAnnotations.EndsWithAttribute.EndsWithAttribute(string text) -> void +GSoft.ComponentModel.DataAnnotations.GuidAttribute +GSoft.ComponentModel.DataAnnotations.GuidAttribute.Format.get -> string +GSoft.ComponentModel.DataAnnotations.GuidAttribute.GuidAttribute(string format = null) -> void +GSoft.ComponentModel.DataAnnotations.NonSensitiveInformationAttribute +GSoft.ComponentModel.DataAnnotations.NonSensitiveInformationAttribute.NonSensitiveInformationAttribute() -> void +GSoft.ComponentModel.DataAnnotations.NotEmptyAttribute +GSoft.ComponentModel.DataAnnotations.NotEmptyAttribute.NotEmptyAttribute() -> void +GSoft.ComponentModel.DataAnnotations.ProvidedByAzureAppConfigAttribute +GSoft.ComponentModel.DataAnnotations.ProvidedByAzureAppConfigAttribute.ProvidedByAzureAppConfigAttribute() -> void +GSoft.ComponentModel.DataAnnotations.ProvidedByAzureKeyVaultAttribute +GSoft.ComponentModel.DataAnnotations.ProvidedByAzureKeyVaultAttribute.ProvidedByAzureKeyVaultAttribute() -> void +GSoft.ComponentModel.DataAnnotations.SensitiveInformationAttribute +GSoft.ComponentModel.DataAnnotations.SensitiveInformationAttribute.Scope.get -> GSoft.ComponentModel.DataAnnotations.SensitivityScope +GSoft.ComponentModel.DataAnnotations.SensitiveInformationAttribute.SensitiveInformationAttribute(GSoft.ComponentModel.DataAnnotations.SensitivityScope scope) -> void +GSoft.ComponentModel.DataAnnotations.SensitivityScope +GSoft.ComponentModel.DataAnnotations.SensitivityScope.Application = 2 -> GSoft.ComponentModel.DataAnnotations.SensitivityScope +GSoft.ComponentModel.DataAnnotations.SensitivityScope.Tenant = 1 -> GSoft.ComponentModel.DataAnnotations.SensitivityScope +GSoft.ComponentModel.DataAnnotations.SensitivityScope.User = 0 -> GSoft.ComponentModel.DataAnnotations.SensitivityScope +GSoft.ComponentModel.DataAnnotations.StartsWithAttribute +GSoft.ComponentModel.DataAnnotations.StartsWithAttribute.StartsWithAttribute(string text) -> void +GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute +GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IgnoreCase.get -> bool +GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IgnoreCase.set -> void +GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.StringComparison.get -> System.StringComparison +GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.Text.get -> string +GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.TextBasedValidationAttribute(string text) -> void +GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute +GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.Format.get -> string +GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.TimeSpanAttribute(string format = null) -> void +GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.UseInvariantCulture.get -> bool +GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.UseInvariantCulture.set -> void +GSoft.ComponentModel.DataAnnotations.UrlOfKindAttribute +GSoft.ComponentModel.DataAnnotations.UrlOfKindAttribute.Kind.get -> System.UriKind +GSoft.ComponentModel.DataAnnotations.UrlOfKindAttribute.UrlOfKindAttribute(System.UriKind kind) -> void +GSoft.ComponentModel.DataAnnotations.ValidatePropertiesAttribute +GSoft.ComponentModel.DataAnnotations.ValidatePropertiesAttribute.ValidatePropertiesAttribute() -> void +override GSoft.ComponentModel.DataAnnotations.GuidAttribute.IsValid(object value) -> bool +override GSoft.ComponentModel.DataAnnotations.NotEmptyAttribute.IsValid(object value) -> bool +override GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IsValid(object value) -> bool +override GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.IsValid(object value) -> bool +override GSoft.ComponentModel.DataAnnotations.UrlOfKindAttribute.IsValid(object value) -> bool +override GSoft.ComponentModel.DataAnnotations.ValidatePropertiesAttribute.IsValid(object value) -> bool \ No newline at end of file diff --git a/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Unshipped.txt b/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Unshipped.txt new file mode 100644 index 0000000..815c920 --- /dev/null +++ b/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Unshipped.txt @@ -0,0 +1 @@ +#nullable enable \ No newline at end of file diff --git a/src/ShareGate.ComponentModel.DataAnnotations/SensitiveInformationAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/SensitiveInformationAttribute.cs similarity index 91% rename from src/ShareGate.ComponentModel.DataAnnotations/SensitiveInformationAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/SensitiveInformationAttribute.cs index 49182ed..62e95fa 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/SensitiveInformationAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/SensitiveInformationAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; /// /// Indicates that a property contains sensitive information, such as personally identifiable information (PII), diff --git a/src/ShareGate.ComponentModel.DataAnnotations/SensitivityScope.cs b/src/GSoft.ComponentModel.DataAnnotations/SensitivityScope.cs similarity index 88% rename from src/ShareGate.ComponentModel.DataAnnotations/SensitivityScope.cs rename to src/GSoft.ComponentModel.DataAnnotations/SensitivityScope.cs index d11bef1..7014891 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/SensitivityScope.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/SensitivityScope.cs @@ -1,4 +1,4 @@ -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; public enum SensitivityScope { diff --git a/src/ShareGate.ComponentModel.DataAnnotations/StartsWithAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/StartsWithAttribute.cs similarity index 88% rename from src/ShareGate.ComponentModel.DataAnnotations/StartsWithAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/StartsWithAttribute.cs index 7c00967..9e6955b 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/StartsWithAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/StartsWithAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)] public sealed class StartsWithAttribute : TextBasedValidationAttribute diff --git a/src/ShareGate.ComponentModel.DataAnnotations/TextBasedValidationAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/TextBasedValidationAttribute.cs similarity index 93% rename from src/ShareGate.ComponentModel.DataAnnotations/TextBasedValidationAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/TextBasedValidationAttribute.cs index 90729fd..a8f3a36 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/TextBasedValidationAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/TextBasedValidationAttribute.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; public abstract class TextBasedValidationAttribute : ValidationAttribute { diff --git a/src/ShareGate.ComponentModel.DataAnnotations/TimeSpanAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/TimeSpanAttribute.cs similarity index 96% rename from src/ShareGate.ComponentModel.DataAnnotations/TimeSpanAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/TimeSpanAttribute.cs index 6be96d4..600a46d 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/TimeSpanAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/TimeSpanAttribute.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Globalization; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)] public sealed class TimeSpanAttribute : ValidationAttribute diff --git a/src/ShareGate.ComponentModel.DataAnnotations/UrlOfKindAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/UrlOfKindAttribute.cs similarity index 96% rename from src/ShareGate.ComponentModel.DataAnnotations/UrlOfKindAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/UrlOfKindAttribute.cs index e52d17d..28e4b9a 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/UrlOfKindAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/UrlOfKindAttribute.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Globalization; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)] public sealed class UrlOfKindAttribute : ValidationAttribute diff --git a/src/ShareGate.ComponentModel.DataAnnotations/ValidatePropertiesAttribute.cs b/src/GSoft.ComponentModel.DataAnnotations/ValidatePropertiesAttribute.cs similarity index 98% rename from src/ShareGate.ComponentModel.DataAnnotations/ValidatePropertiesAttribute.cs rename to src/GSoft.ComponentModel.DataAnnotations/ValidatePropertiesAttribute.cs index 286f4b2..d2197ef 100644 --- a/src/ShareGate.ComponentModel.DataAnnotations/ValidatePropertiesAttribute.cs +++ b/src/GSoft.ComponentModel.DataAnnotations/ValidatePropertiesAttribute.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; -namespace ShareGate.ComponentModel.DataAnnotations; +namespace GSoft.ComponentModel.DataAnnotations; [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)] public sealed class ValidatePropertiesAttribute : ValidationAttribute diff --git a/src/ShareGate.ComponentModel.DataAnnotations/AssemblyProperties.cs b/src/ShareGate.ComponentModel.DataAnnotations/AssemblyProperties.cs deleted file mode 100644 index 5d47655..0000000 --- a/src/ShareGate.ComponentModel.DataAnnotations/AssemblyProperties.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("ShareGate.ComponentModel.DataAnnotations.Tests,PublicKey=" + - "002400000480000094000000060200000024000052534131000400000100010025a65bdbc70c7c" + - "2491ca7ffb4f83d77c9fe93eb216463e832304a9f70d24e9faa54e66dc2294d060dbfad422a849" + - "dd855a1f307d2031169958aa358549bf92af6fe6c318034077d1e54465143aa32781bc08c0ac70" + - "4e1b23228c42a4dd59c0cd1281434748fca3b50abcdee548f281bc485ed10c06a8a524338a5792" + - "58a056b2")] \ No newline at end of file diff --git a/src/ShareGate.ComponentModel.DataAnnotations/ShareGate.ComponentModel.DataAnnotations.csproj b/src/ShareGate.ComponentModel.DataAnnotations/ShareGate.ComponentModel.DataAnnotations.csproj deleted file mode 100644 index 14838d5..0000000 --- a/src/ShareGate.ComponentModel.DataAnnotations/ShareGate.ComponentModel.DataAnnotations.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - net462;net6.0;netstandard2.0 - True - True - snupkg - ShareGate.ComponentModel.DataAnnotations - ShareGate.ComponentModel.DataAnnotations - true - true - ../ShareGate.ComponentModel.DataAnnotations.snk - README.md - - - - - - - - - - From 5c82c1c6c7b54ee1202398792d8b28f65e017ff4 Mon Sep 17 00:00:00 2001 From: Anthony Simmon Date: Tue, 10 Jan 2023 17:37:52 -0500 Subject: [PATCH 2/9] Prepare build.ps1 for renaming --- build.ps1 => build-tmp.ps1 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename build.ps1 => build-tmp.ps1 (100%) diff --git a/build.ps1 b/build-tmp.ps1 similarity index 100% rename from build.ps1 rename to build-tmp.ps1 From d528a4a5eea1b610c9d1a3004752b35b09bc3885 Mon Sep 17 00:00:00 2001 From: Anthony Simmon Date: Tue, 10 Jan 2023 17:38:08 -0500 Subject: [PATCH 3/9] Renamed build.ps1 to Build.ps1 --- build-tmp.ps1 => Build.ps1 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename build-tmp.ps1 => Build.ps1 (100%) diff --git a/build-tmp.ps1 b/Build.ps1 similarity index 100% rename from build-tmp.ps1 rename to Build.ps1 From 271865cd97690181fd5376b39be787a9abca1558 Mon Sep 17 00:00:00 2001 From: Anthony Simmon Date: Tue, 10 Jan 2023 17:43:49 -0500 Subject: [PATCH 4/9] Update Build.ps1 and fix public API with nullables --- Build.ps1 | 37 ++++++++++++++++++- .../PublicAPI.Shipped.txt | 32 ++++++++-------- 2 files changed, 51 insertions(+), 18 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index a707719..83b05ee 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -1,2 +1,35 @@ -dotnet run --project build/Build.csproj -- $args -exit $LASTEXITCODE; \ No newline at end of file +#Requires -Version 5.0 + +Begin { + $ErrorActionPreference = "stop" +} + +Process { + function Exec([scriptblock]$Command) { + & $Command + if ($LASTEXITCODE -ne 0) { + throw ("An error occurred while executing command: {0}" -f $Command) + } + } + + $workingDir = Join-Path $PSScriptRoot "src" + $outputDir = Join-Path $PSScriptRoot ".output" + $nupkgsPath = Join-Path $outputDir "*.nupkg" + + try { + Push-Location $workingDir + Remove-Item $outputDir -Force -Recurse -ErrorAction SilentlyContinue + + Exec { & dotnet clean -c Release } + Exec { & dotnet build -c Release } + Exec { & dotnet test -c Release --no-build -r "$outputDir" --no-restore -l "trx" -l "console;verbosity=detailed" } + Exec { & dotnet pack -c Release --no-build -o "$outputDir" } + + if (($null -ne $env:NUGET_SOURCE ) -and ($null -ne $env:NUGET_API_KEY)) { + Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k $env:NUGET_API_KEY } + } + } + finally { + Pop-Location + } +} \ No newline at end of file diff --git a/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Shipped.txt b/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Shipped.txt index 3436e2d..38f2935 100644 --- a/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Shipped.txt +++ b/src/GSoft.ComponentModel.DataAnnotations/PublicAPI.Shipped.txt @@ -1,12 +1,12 @@ #nullable enable -abstract GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IsValid(string value) -> bool +abstract GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IsValid(string! value) -> bool GSoft.ComponentModel.DataAnnotations.ContainsAttribute -GSoft.ComponentModel.DataAnnotations.ContainsAttribute.ContainsAttribute(string text) -> void +GSoft.ComponentModel.DataAnnotations.ContainsAttribute.ContainsAttribute(string! text) -> void GSoft.ComponentModel.DataAnnotations.EndsWithAttribute -GSoft.ComponentModel.DataAnnotations.EndsWithAttribute.EndsWithAttribute(string text) -> void +GSoft.ComponentModel.DataAnnotations.EndsWithAttribute.EndsWithAttribute(string! text) -> void GSoft.ComponentModel.DataAnnotations.GuidAttribute -GSoft.ComponentModel.DataAnnotations.GuidAttribute.Format.get -> string -GSoft.ComponentModel.DataAnnotations.GuidAttribute.GuidAttribute(string format = null) -> void +GSoft.ComponentModel.DataAnnotations.GuidAttribute.Format.get -> string? +GSoft.ComponentModel.DataAnnotations.GuidAttribute.GuidAttribute(string? format = null) -> void GSoft.ComponentModel.DataAnnotations.NonSensitiveInformationAttribute GSoft.ComponentModel.DataAnnotations.NonSensitiveInformationAttribute.NonSensitiveInformationAttribute() -> void GSoft.ComponentModel.DataAnnotations.NotEmptyAttribute @@ -23,16 +23,16 @@ GSoft.ComponentModel.DataAnnotations.SensitivityScope.Application = 2 -> GSoft.C GSoft.ComponentModel.DataAnnotations.SensitivityScope.Tenant = 1 -> GSoft.ComponentModel.DataAnnotations.SensitivityScope GSoft.ComponentModel.DataAnnotations.SensitivityScope.User = 0 -> GSoft.ComponentModel.DataAnnotations.SensitivityScope GSoft.ComponentModel.DataAnnotations.StartsWithAttribute -GSoft.ComponentModel.DataAnnotations.StartsWithAttribute.StartsWithAttribute(string text) -> void +GSoft.ComponentModel.DataAnnotations.StartsWithAttribute.StartsWithAttribute(string! text) -> void GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IgnoreCase.get -> bool GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IgnoreCase.set -> void GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.StringComparison.get -> System.StringComparison -GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.Text.get -> string -GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.TextBasedValidationAttribute(string text) -> void +GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.Text.get -> string! +GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.TextBasedValidationAttribute(string! text) -> void GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute -GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.Format.get -> string -GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.TimeSpanAttribute(string format = null) -> void +GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.Format.get -> string? +GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.TimeSpanAttribute(string? format = null) -> void GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.UseInvariantCulture.get -> bool GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.UseInvariantCulture.set -> void GSoft.ComponentModel.DataAnnotations.UrlOfKindAttribute @@ -40,9 +40,9 @@ GSoft.ComponentModel.DataAnnotations.UrlOfKindAttribute.Kind.get -> System.UriKi GSoft.ComponentModel.DataAnnotations.UrlOfKindAttribute.UrlOfKindAttribute(System.UriKind kind) -> void GSoft.ComponentModel.DataAnnotations.ValidatePropertiesAttribute GSoft.ComponentModel.DataAnnotations.ValidatePropertiesAttribute.ValidatePropertiesAttribute() -> void -override GSoft.ComponentModel.DataAnnotations.GuidAttribute.IsValid(object value) -> bool -override GSoft.ComponentModel.DataAnnotations.NotEmptyAttribute.IsValid(object value) -> bool -override GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IsValid(object value) -> bool -override GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.IsValid(object value) -> bool -override GSoft.ComponentModel.DataAnnotations.UrlOfKindAttribute.IsValid(object value) -> bool -override GSoft.ComponentModel.DataAnnotations.ValidatePropertiesAttribute.IsValid(object value) -> bool \ No newline at end of file +override GSoft.ComponentModel.DataAnnotations.GuidAttribute.IsValid(object? value) -> bool +override GSoft.ComponentModel.DataAnnotations.NotEmptyAttribute.IsValid(object? value) -> bool +override GSoft.ComponentModel.DataAnnotations.TextBasedValidationAttribute.IsValid(object? value) -> bool +override GSoft.ComponentModel.DataAnnotations.TimeSpanAttribute.IsValid(object? value) -> bool +override GSoft.ComponentModel.DataAnnotations.UrlOfKindAttribute.IsValid(object? value) -> bool +override GSoft.ComponentModel.DataAnnotations.ValidatePropertiesAttribute.IsValid(object? value) -> bool \ No newline at end of file From cbef7c91290105507dad376202587ae802cdf6c9 Mon Sep 17 00:00:00 2001 From: Anthony Simmon Date: Tue, 10 Jan 2023 18:09:08 -0500 Subject: [PATCH 5/9] Fix copyright typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1958f68..72efc03 100644 --- a/README.md +++ b/README.md @@ -42,4 +42,4 @@ Pull requests are welcome. For major changes, please open an issue first to disc ## License -Copyright © 2022, GSoft inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/gsoft-license/blob/master/LICENSE. +Copyright © 2022, GSoft Group Inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/gsoft-license/blob/master/LICENSE. From 2a0ab1cddd6f99f6631160188660e414c0290b28 Mon Sep 17 00:00:00 2001 From: Anthony Simmon Date: Tue, 10 Jan 2023 18:20:06 -0500 Subject: [PATCH 6/9] Remove support for .NET 3.1 --- .../GSoft.ComponentModel.DataAnnotations.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GSoft.ComponentModel.DataAnnotations.Tests/GSoft.ComponentModel.DataAnnotations.Tests.csproj b/src/GSoft.ComponentModel.DataAnnotations.Tests/GSoft.ComponentModel.DataAnnotations.Tests.csproj index 6f17b93..85f4bc3 100644 --- a/src/GSoft.ComponentModel.DataAnnotations.Tests/GSoft.ComponentModel.DataAnnotations.Tests.csproj +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/GSoft.ComponentModel.DataAnnotations.Tests.csproj @@ -1,6 +1,6 @@ - net462;net6.0;netcoreapp3.1 + net462;net6.0 false true true From fc5b308b6e2ad02dfba2431acc6e3d1ca62ba6ca Mon Sep 17 00:00:00 2001 From: Anthony Simmon Date: Tue, 10 Jan 2023 18:24:08 -0500 Subject: [PATCH 7/9] Remove unnecessary usings --- .../ContainsAttributeTests.cs | 2 -- .../EndsWithAttributeTests.cs | 2 -- .../GuidAttributeTests.cs | 1 - .../NotEmptyAttributeTests.cs | 1 - .../StartsWithAttributeTests.cs | 2 -- .../TimeSpanAttributeTests.cs | 1 - .../UrlOfKindAttributeTests.cs | 1 - .../ValidatePropertiesAttributeTests.cs | 1 - 8 files changed, 11 deletions(-) diff --git a/src/GSoft.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs index 44cef7c..795baf8 100644 --- a/src/GSoft.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/ContainsAttributeTests.cs @@ -1,5 +1,3 @@ -using Xunit; - namespace GSoft.ComponentModel.DataAnnotations.Tests; public class ContainsAttributeTests diff --git a/src/GSoft.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs index 7cbfd4d..7574c00 100644 --- a/src/GSoft.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/EndsWithAttributeTests.cs @@ -1,5 +1,3 @@ -using Xunit; - namespace GSoft.ComponentModel.DataAnnotations.Tests; public class EndsWithAttributeTests diff --git a/src/GSoft.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs index 8b1766a..a69294b 100644 --- a/src/GSoft.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/GuidAttributeTests.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Xunit; namespace GSoft.ComponentModel.DataAnnotations.Tests; diff --git a/src/GSoft.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs index f8e08a3..4b34b31 100644 --- a/src/GSoft.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/NotEmptyAttributeTests.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Globalization; -using Xunit; namespace GSoft.ComponentModel.DataAnnotations.Tests; diff --git a/src/GSoft.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs index 23aa69b..e50d31d 100644 --- a/src/GSoft.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/StartsWithAttributeTests.cs @@ -1,5 +1,3 @@ -using Xunit; - namespace GSoft.ComponentModel.DataAnnotations.Tests; public class StartsWithAttributeTests diff --git a/src/GSoft.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs index 45f6b83..a458758 100644 --- a/src/GSoft.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/TimeSpanAttributeTests.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Xunit; namespace GSoft.ComponentModel.DataAnnotations.Tests; diff --git a/src/GSoft.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs index 29f3a69..91344b3 100644 --- a/src/GSoft.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/UrlOfKindAttributeTests.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Xunit; namespace GSoft.ComponentModel.DataAnnotations.Tests; diff --git a/src/GSoft.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs b/src/GSoft.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs index 8437a14..64a18be 100644 --- a/src/GSoft.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs +++ b/src/GSoft.ComponentModel.DataAnnotations.Tests/ValidatePropertiesAttributeTests.cs @@ -1,6 +1,5 @@ using System; using System.ComponentModel.DataAnnotations; -using Xunit; namespace GSoft.ComponentModel.DataAnnotations.Tests; From 9e647023161a4f6e37dfe7d554cb7510a5f2ed79 Mon Sep 17 00:00:00 2001 From: Anthony Simmon Date: Wed, 11 Jan 2023 17:53:56 -0500 Subject: [PATCH 8/9] Update package description Co-authored-by: Guillaume Caya-Letourneau --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 540e367..d4134f2 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -9,7 +9,7 @@ 10 enable disable - Provides informational attributes and additional validation attributes that can be used during model binding. + Provides additional informational and validation attributes that can be used during model binding. From 4a98367c13163b02e2790fa00db70650824b5816 Mon Sep 17 00:00:00 2001 From: Anthony Simmon Date: Thu, 12 Jan 2023 10:12:57 -0500 Subject: [PATCH 9/9] Remove contribute section in readme --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 72efc03..907c25e 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,6 @@ The most useful validation attribute here is probably `ValidatePropertiesAttribu | `SensitiveInformationAttribute` | Indicates that a property contains sensitive information, such as personally identifiable information (PII), or any other information that might result in loss of an advantage or level of security if disclosed to others (_has no effect_) | | `NonSensitiveInformationAttribute` | Indicates that a property does not contain sensitive information (_has no effect_) | -## 🤝 Contributing - -Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. If you're interested, definitely check out our Contributing Guide! - ## License