Show / Hide Table of Contents

Struct EqualityComparerBuilder<T>

Generates hash code and equality check functions for the particular type.

Namespace: DotNext
Assembly: DotNext.dll
Syntax
public struct EqualityComparerBuilder<T>
Type Parameters
Name Description
T

The type for which equality check and hash code functions should be generated.

Remarks

Automatically generated hash code and equality check functions can be used instead of manually written implementation of overridden and methods.

Properties

| Improve this Doc View Source

ExcludedFields

Sets an array of excluded field names.

Declaration
public string[] ExcludedFields { set; }
Property Value
Type Description
String[]

An array of excluded fields.

| Improve this Doc View Source

SaltedHashCode

Set a value indicating that hash code must be unique for each application instance.

Declaration
public bool SaltedHashCode { set; }
Property Value
Type Description
Boolean

true to include randomized salt data into hashing; false to use data from memory only.

Methods

| Improve this Doc View Source

Build()

Generates implementation of equality comparer.

Declaration
public IEqualityComparer<T> Build()
Returns
Type Description
IEqualityComparer<T>

The generated equality comparer.

| Improve this Doc View Source

Build(out Func<T, T, Boolean>, out Func<T, Int32>)

Generates implementation of and methods for particular type T.

Declaration
public void Build(out Func<T, T, bool> equals, out Func<T, int> hashCode)
Parameters
Type Name Description
DotNext.Func<T, T, Boolean> equals

The implementation of equality check.

DotNext.Func<T, Int32> hashCode

The implementation of hash code.

Extension Methods

ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX