Table of Contents

Struct TypeMappingKey

Namespace
LfrlAnvil.Mapping.Internal
Assembly
LfrlAnvil.Mapping.dll

Represents a SourceType => DestinationType mapping definition key.

public readonly struct TypeMappingKey : IEquatable<TypeMappingKey>
Implements
Inherited Members

Constructors

TypeMappingKey(Type, Type)

Creates a new TypeMappingKey instance.

public TypeMappingKey(Type sourceType, Type destinationType)

Parameters

sourceType Type

Source type.

destinationType Type

Destination type.

Properties

DestinationType

Destination type.

public Type? DestinationType { get; }

Property Value

Type

SourceType

Source type.

public Type? SourceType { get; }

Property Value

Type

Methods

Equals(TypeMappingKey)

Indicates whether the current object is equal to another object of the same type.

[Pure]
public bool Equals(TypeMappingKey other)

Parameters

other TypeMappingKey

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

[Pure]
public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

[Pure]
public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns a string representation of this TypeMappingKey instance.

[Pure]
public override string ToString()

Returns

string

String representation.

Operators

operator ==(TypeMappingKey, TypeMappingKey)

Checks if a is equal to b.

[Pure]
public static bool operator ==(TypeMappingKey a, TypeMappingKey b)

Parameters

a TypeMappingKey

First operand.

b TypeMappingKey

Second operand.

Returns

bool

true when operands are equal, otherwise false.

operator !=(TypeMappingKey, TypeMappingKey)

Checks if a is not equal to b.

[Pure]
public static bool operator !=(TypeMappingKey a, TypeMappingKey b)

Parameters

a TypeMappingKey

First operand.

b TypeMappingKey

Second operand.

Returns

bool

true when operands are not equal, otherwise false.