121
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Reflection;
5
6
// source: https://github.com/jhewlett/ValueObject
7
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
8
internal sealed class IgnoreMemberAttribute : Attribute
9
{ }
10
11
internal interface IValueObject<T>
12
: IEquatable<T>
13
{
14
public int GetHashCode();
15
16
public int HashValue(int seed, object value);
17
}
18
19
// Learn more: https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/microservice-ddd-cqrs-patterns/implement-value-objects
20
// source: https://github.com/jhewlett/ValueObject
21
public abstract class ValueObject : IValueObject<ValueObject>
22
{
23
private List<FieldInfo>? _fields;
24
Cached Result
True
False
True
True
False
True
True