generated from Nexus-Mods/NexusMods.App.Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix source generators for collection attributes
- Loading branch information
Showing
6 changed files
with
56 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/NexusMods.MnemonicDB.TestModel/Attributes/StringsAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using NexusMods.MnemonicDB.Abstractions; | ||
using NexusMods.MnemonicDB.Abstractions.Attributes; | ||
using NexusMods.MnemonicDB.Abstractions.ElementComparers; | ||
|
||
namespace NexusMods.MnemonicDB.TestModel.Attributes; | ||
|
||
public class StringsAttribute(string ns, string name) : CollectionAttribute<string, string>(ValueTags.Utf8, ns, name) | ||
{ | ||
protected override string ToLowLevel(string value) | ||
{ | ||
return value; | ||
} | ||
|
||
protected override string FromLowLevel(string value, ValueTags tag, RegistryId registryId) | ||
{ | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...exusMods.MnemonicDB.Tests/DbTests.MultipleIncludesCanBeConstructedSeparately.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
+ | 0100000000000003 | (0008) Timestamp | DateTime : 0 | 0100000000000003 | ||
+ | 0200000000000001 | (001C) Name | Parent A | 0100000000000003 | ||
+ | 0200000000000001 | (001D) Name | Parent B | 0100000000000003 | ||
+ | 0200000000000001 | (001E) Name | Test Child | 0100000000000003 | ||
+ | 0200000000000001 | (001D) Name | Parent A | 0100000000000003 | ||
+ | 0200000000000001 | (001E) Name | Parent B | 0100000000000003 | ||
+ | 0200000000000001 | (001F) Name | Test Child | 0100000000000003 |
6 changes: 3 additions & 3 deletions
6
tests/NexusMods.MnemonicDB.Tests/DbTests.MultipleIncludesDontSplitEntities.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
+ | 0100000000000003 | (0008) Timestamp | DateTime : 0 | 0100000000000003 | ||
+ | 0200000000000001 | (001C) Name | Parent A | 0100000000000003 | ||
+ | 0200000000000001 | (001D) Name | Parent B | 0100000000000003 | ||
+ | 0200000000000001 | (001E) Name | Test Child | 0100000000000003 | ||
+ | 0200000000000001 | (001D) Name | Parent A | 0100000000000003 | ||
+ | 0200000000000001 | (001E) Name | Parent B | 0100000000000003 | ||
+ | 0200000000000001 | (001F) Name | Test Child | 0100000000000003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters