Skip to content

Showcase generic templates applying to all struct ids#22

Merged
kzu merged 1 commit intomainfrom
dev/generictemplates
Nov 30, 2024
Merged

Showcase generic templates applying to all struct ids#22
kzu merged 1 commit intomainfrom
dev/generictemplates

Conversation

@kzu
Copy link
Copy Markdown
Member

@kzu kzu commented Nov 30, 2024

A generic template can be applied to all struct-based ids by providing a ValueType primary constructor. To make it apply to both structs and string-based ids, use object as the primary constructor value.

@kzu kzu added the enhancement New feature or request label Nov 30, 2024
@kzu kzu force-pushed the dev/generictemplates branch 2 times, most recently from 49276fd to 052790a Compare November 30, 2024 14:28
@kzu kzu enabled auto-merge (rebase) November 30, 2024 14:29
A generic template can be applied to all struct-based ids by providing a ValueType primary constructor. To make it apply to both structs and string-based ids, use `object` as the primary constructor value.
@kzu kzu force-pushed the dev/generictemplates branch from 052790a to ed69102 Compare November 30, 2024 14:31
@devlooped-bot
Copy link
Copy Markdown
Member

devlooped-bot commented Nov 30, 2024

31 passed 31 passed
31 passed 31 passed
31 passed 31 passed

🧪 Details on macOS Unix 14.7.1

✅ StructId.ComparableGeneratorTests.GenerateComparable
✅ StructId.ComparableGeneratorTests.GenerateStringParseable
✅ StructId.ConstructorGeneratorTests.GenerateRecordConstructor
✅ StructId.ConstructorGeneratorTests.GenerateRecordConstructorInGlobalNamespace
✅ StructId.ConstructorGeneratorTests.GenerateRecordStringConstructor
✅ StructId.Functional.FunctionalTests.CustomTemplate
✅ StructId.Functional.FunctionalTests.Dapper
✅ StructId.Functional.FunctionalTests.EntityFramework
✅ StructId.Functional.FunctionalTests.EqualityTest
✅ StructId.Functional.FunctionalTests.ImplicitAndExplicitCast
✅ StructId.Functional.FunctionalTests.Newtonsoft
✅ StructId.NewtonsoftJsonGeneratorTests.DoesNotGenerateIfNewtonsoftJsonNotPresent
✅ StructId.NewtonsoftJsonGeneratorTests.GenerateIfNewtonsoftJsonPresent
✅ StructId.ParsableGeneratorTests.GenerateParseable
✅ StructId.ParsableGeneratorTests.GenerateStringParseable
✅ StructId.ParsableGeneratorTests.NoParseableAvailable
✅ StructId.RecordAnalyzerTests.ClassNotStructId
✅ StructId.RecordAnalyzerTests.PartialRecordStructNotReadonly
✅ StructId.RecordAnalyzerTests.PartialStringRecordStructNotReadonly
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructNoStructId
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructNotPartial
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructWithNonValueConstructor
✅ StructId.RecordAnalyzerTests.ReadonlyStringRecordStructNotPartial
✅ StructId.RecordAnalyzerTests.RecordStructNoStructId
✅ StructId.RecordAnalyzerTests.RecordStructNotReadonlyNorPartial
✅ StructId.RecordAnalyzerTests.StructNotStructId
✅ StructId.RecordCodeFixTests.AddPartialKeyword
✅ StructId.RecordCodeFixTests.AddReadOnlyModifier
✅ StructId.RecordCodeFixTests.ChangeRecordStruct
✅ StructId.RecordCtorCodeFixTests.RemoveCtor
✅ StructId.RecordCtorCodeFixTests.RenameValue

🧪 Details on Ubuntu 22.04.5 LTS

✅ StructId.ComparableGeneratorTests.GenerateComparable
✅ StructId.ComparableGeneratorTests.GenerateStringParseable
✅ StructId.ConstructorGeneratorTests.GenerateRecordConstructor
✅ StructId.ConstructorGeneratorTests.GenerateRecordConstructorInGlobalNamespace
✅ StructId.ConstructorGeneratorTests.GenerateRecordStringConstructor
✅ StructId.Functional.FunctionalTests.CustomTemplate
✅ StructId.Functional.FunctionalTests.Dapper
✅ StructId.Functional.FunctionalTests.EntityFramework
✅ StructId.Functional.FunctionalTests.EqualityTest
✅ StructId.Functional.FunctionalTests.ImplicitAndExplicitCast
✅ StructId.Functional.FunctionalTests.Newtonsoft
✅ StructId.NewtonsoftJsonGeneratorTests.DoesNotGenerateIfNewtonsoftJsonNotPresent
✅ StructId.NewtonsoftJsonGeneratorTests.GenerateIfNewtonsoftJsonPresent
✅ StructId.ParsableGeneratorTests.GenerateParseable
✅ StructId.ParsableGeneratorTests.GenerateStringParseable
✅ StructId.ParsableGeneratorTests.NoParseableAvailable
✅ StructId.RecordAnalyzerTests.ClassNotStructId
✅ StructId.RecordAnalyzerTests.PartialRecordStructNotReadonly
✅ StructId.RecordAnalyzerTests.PartialStringRecordStructNotReadonly
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructNoStructId
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructNotPartial
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructWithNonValueConstructor
✅ StructId.RecordAnalyzerTests.ReadonlyStringRecordStructNotPartial
✅ StructId.RecordAnalyzerTests.RecordStructNoStructId
✅ StructId.RecordAnalyzerTests.RecordStructNotReadonlyNorPartial
✅ StructId.RecordAnalyzerTests.StructNotStructId
✅ StructId.RecordCodeFixTests.AddPartialKeyword
✅ StructId.RecordCodeFixTests.AddReadOnlyModifier
✅ StructId.RecordCodeFixTests.ChangeRecordStruct
✅ StructId.RecordCtorCodeFixTests.RemoveCtor
✅ StructId.RecordCtorCodeFixTests.RenameValue

🧪 Details on Microsoft Windows 10.0.20348

✅ StructId.ComparableGeneratorTests.GenerateComparable
✅ StructId.ComparableGeneratorTests.GenerateStringParseable
✅ StructId.ConstructorGeneratorTests.GenerateRecordConstructor
✅ StructId.ConstructorGeneratorTests.GenerateRecordConstructorInGlobalNamespace
✅ StructId.ConstructorGeneratorTests.GenerateRecordStringConstructor
✅ StructId.Functional.FunctionalTests.CustomTemplate
✅ StructId.Functional.FunctionalTests.Dapper
✅ StructId.Functional.FunctionalTests.EntityFramework
✅ StructId.Functional.FunctionalTests.EqualityTest
✅ StructId.Functional.FunctionalTests.ImplicitAndExplicitCast
✅ StructId.Functional.FunctionalTests.Newtonsoft
✅ StructId.NewtonsoftJsonGeneratorTests.DoesNotGenerateIfNewtonsoftJsonNotPresent
✅ StructId.NewtonsoftJsonGeneratorTests.GenerateIfNewtonsoftJsonPresent
✅ StructId.ParsableGeneratorTests.GenerateParseable
✅ StructId.ParsableGeneratorTests.GenerateStringParseable
✅ StructId.ParsableGeneratorTests.NoParseableAvailable
✅ StructId.RecordAnalyzerTests.ClassNotStructId
✅ StructId.RecordAnalyzerTests.PartialRecordStructNotReadonly
✅ StructId.RecordAnalyzerTests.PartialStringRecordStructNotReadonly
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructNoStructId
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructNotPartial
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructWithNonValueConstructor
✅ StructId.RecordAnalyzerTests.ReadonlyStringRecordStructNotPartial
✅ StructId.RecordAnalyzerTests.RecordStructNoStructId
✅ StructId.RecordAnalyzerTests.RecordStructNotReadonlyNorPartial
✅ StructId.RecordAnalyzerTests.StructNotStructId
✅ StructId.RecordCodeFixTests.AddPartialKeyword
✅ StructId.RecordCodeFixTests.AddReadOnlyModifier
✅ StructId.RecordCodeFixTests.ChangeRecordStruct
✅ StructId.RecordCtorCodeFixTests.RemoveCtor
✅ StructId.RecordCtorCodeFixTests.RenameValue

from dotnet-retest v0.6.3 on .NET 8.0.11 with 💜

@kzu kzu merged commit 525334b into main Nov 30, 2024
@kzu kzu deleted the dev/generictemplates branch November 30, 2024 14:33
@devlooped devlooped locked and limited conversation to collaborators Dec 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants