You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var lookup = new global::System.Collections.Generic.Dictionary<").AppendTypeFullyQualified(keyMember).Append(", ").AppendTypeFullyQualified(_state).Append(">(").Append(totalNumberOfItems);
throw new global::System.ArgumentException($""The type \""").AppendTypeMinimallyQualified(_state).Append(@"\"" has multiple items with the identifier \""{item.").Append(keyMember.Name).Append(@"}\""."");
public static ").AppendTypeFullyQualified(_state).Append(" ").Append(Constants.Methods.GET).Append("(global::System.ReadOnlySpan<char> ").AppendEscaped(keyProperty.ArgumentName).Append(@")
1439
1381
{
1440
-
if (!_lookups.Value.Item2.TryGetValue(").AppendEscaped(keyProperty.ArgumentName).Append(@", out var item))
1382
+
if (!_lookups.Value.AlternateLookup.TryGetValue(").AppendEscaped(keyProperty.ArgumentName).Append(@", out var item))
1441
1383
{");
1442
1384
1443
1385
if(_state.Settings.IsValidatable)
@@ -1495,7 +1437,7 @@ private void GenerateCreateAndCheckInvalidItem(IMemberState keyProperty, bool ne
1495
1437
{
1496
1438
_sb.Append(@"
1497
1439
1498
-
if (_itemsLookup.ContainsKey(item.").Append(keyProperty.Name).Append(@"))
1440
+
if (_lookups.Value.Lookup.ContainsKey(item.").Append(keyProperty.Name).Append(@"))
1499
1441
throw new global::System.Exception(""The implementation of method '").Append(Constants.Methods.CREATE_INVALID_ITEM).Append("' must not return an instance with property '").Append(keyProperty.Name).Append(@"' equals to one of a valid item."");");
Copy file name to clipboardExpand all lines: test/Thinktecture.Runtime.Extensions.SourceGenerator.Tests/SourceGeneratorTests/Snapshots/EnumSourceGeneratorTests.Should_generate_advanced_string_based_validatable_class_0.verified.cs
thrownewglobal::System.Exception("The implementation of method 'CreateInvalidItem' must return an instance with property 'IsValid' equals to 'false'.");
189
177
190
-
if(_itemsLookup.ContainsKey(item.Name))
178
+
if(_lookups.Value.Lookup.ContainsKey(item.Name))
191
179
thrownewglobal::System.Exception("The implementation of method 'CreateInvalidItem' must not return an instance with property 'Name' equals to one of a valid item.");
192
180
193
181
returnitem;
@@ -207,7 +195,7 @@ public static bool TryGet([global::System.Diagnostics.CodeAnalysis.AllowNull] st
0 commit comments