Skip to content

Commit b53bf34

Browse files
committed
Suppressions and summary corrections.
1 parent 898c491 commit b53bf34

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

DomainModeling.Tests/EntityFramework/EntityFrameworkConfigurationGeneratorTests.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
108108
internal sealed class DomainEventForEF : IDomainObject
109109
{
110110
/// <summary>
111-
/// This lets us test if a constructor as used or not.
111+
/// This lets us test if a constructor is used or not.
112112
/// </summary>
113113
public bool HasFieldInitializerRun { get; } = true;
114114

@@ -131,7 +131,7 @@ public DomainEventForEF(DomainEventForEFId id, object ignored)
131131
internal sealed class EntityForEF : Entity<EntityForEFId, int>
132132
{
133133
/// <summary>
134-
/// This lets us test if a constructor as used or not.
134+
/// This lets us test if a constructor is used or not.
135135
/// </summary>
136136
public bool HasFieldInitializerRun { get; } = true;
137137

@@ -146,12 +146,14 @@ public EntityForEF(ValueObjectForEF values)
146146
this.Values = values;
147147
}
148148

149+
#pragma warning disable IDE0079 // Remove unnecessary suppression -- Suppression below is falsely flagged as unnecessary
149150
#pragma warning disable CS8618 // Reconstitution constructor
150151
private EntityForEF()
151152
: base(default)
152153
{
153154
}
154155
#pragma warning restore CS8618
156+
#pragma warning restore IDE0079
155157
}
156158

157159
[WrapperValueObject<string>]
@@ -160,7 +162,7 @@ internal sealed partial class Wrapper1ForEF
160162
protected override StringComparison StringComparison => StringComparison.Ordinal;
161163

162164
/// <summary>
163-
/// This lets us test if a constructor as used or not.
165+
/// This lets us test if a constructor is used or not.
164166
/// </summary>
165167
public bool HasFieldInitializerRun { get; } = true;
166168

@@ -177,7 +179,7 @@ public Wrapper1ForEF(string value)
177179
internal sealed partial class Wrapper2ForEF
178180
{
179181
/// <summary>
180-
/// This lets us test if a constructor as used or not.
182+
/// This lets us test if a constructor is used or not.
181183
/// </summary>
182184
public bool HasFieldInitializerRun { get; } = true;
183185

@@ -194,7 +196,7 @@ public Wrapper2ForEF(decimal value)
194196
internal sealed partial class ValueObjectForEF
195197
{
196198
/// <summary>
197-
/// This lets us test if a constructor as used or not.
199+
/// This lets us test if a constructor is used or not.
198200
/// </summary>
199201
public bool HasFieldInitializerRun = true;
200202

DomainModeling/Comparisons/DictionaryComparer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ public static int GetDictionaryHashCode<TKey, TValue>(Dictionary<TKey, TValue>?
7676
public static bool DictionaryEquals<TKey, TValue>(IReadOnlyDictionary<TKey, TValue>? left, IReadOnlyDictionary<TKey, TValue>? right)
7777
{
7878
// Devirtualized path for practically all dictionaries
79+
#pragma warning disable IDE0079 // Remove unnecessary suppression -- Suppression below is falsely flagged as unnecessary
7980
#pragma warning disable CS8714 // The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint. -- Was type-checked
8081
if (left is Dictionary<TKey, TValue> leftDict && right is Dictionary<TKey, TValue> rightDict)
8182
return DictionaryEquals(leftDict, rightDict);
8283
#pragma warning restore CS8714 // The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.
84+
#pragma warning restore IDE0079
8385

8486
return GetResult(left, right);
8587

@@ -115,10 +117,12 @@ static bool GetResult(IReadOnlyDictionary<TKey, TValue>? left, IReadOnlyDictiona
115117
public static bool DictionaryEquals<TKey, TValue>(IDictionary<TKey, TValue>? left, IDictionary<TKey, TValue>? right)
116118
{
117119
// Devirtualized path for practically all dictionaries
120+
#pragma warning disable IDE0079 // Remove unnecessary suppression -- Suppression below is falsely flagged as unnecessary
118121
#pragma warning disable CS8714 // The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint. -- Was type-checked
119122
if (left is Dictionary<TKey, TValue> leftDict && right is Dictionary<TKey, TValue> rightDict)
120123
return DictionaryEquals(leftDict, rightDict);
121124
#pragma warning restore CS8714 // The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.
125+
#pragma warning restore IDE0079
122126

123127
return GetResult(left, right);
124128

DomainModeling/ISerializableDomainObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Architect.DomainModeling;
44

55
/// <summary>
6-
/// An <see cref="IDomainObject"/> of type <typeparamref name="TModel"/> that can be serialized and deserialized to underlying type <typeparamref name="TUnderlying"/>.
6+
/// A domain object of type <typeparamref name="TModel"/> that can be serialized to and deserialized from underlying type <typeparamref name="TUnderlying"/>.
77
/// </summary>
88
public interface ISerializableDomainObject<
99
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TModel,

0 commit comments

Comments
 (0)