Table of Contents

Class PropertyInequality<TLeft, TRight, TValue>

Namespace
NMF.Synchronizations
Assembly
NMF.Synchronizations.dll

Denotes an inconsistency that a property had different values

public class PropertyInequality<TLeft, TRight, TValue> : IInconsistency, IEquatable<IInconsistency>

Type Parameters

TLeft

The LHS context type

TRight

The RHS context type

TValue

The type of the property

Inheritance
PropertyInequality<TLeft, TRight, TValue>
Implements
Inherited Members

Constructors

PropertyInequality(TLeft, Action<TLeft, TValue>, TValue, TRight, Action<TRight, TValue>, TValue)

Creates a new instance

public PropertyInequality(TLeft leftContext, Action<TLeft, TValue> leftSetter, TValue leftValue, TRight rightContext, Action<TRight, TValue> rightSetter, TValue rightValue)

Parameters

leftContext TLeft

The LHS context element

leftSetter Action<TLeft, TValue>

The LHS setter

leftValue TValue

The left value

rightContext TRight

The RHS context element

rightSetter Action<TRight, TValue>

The RHS setter

rightValue TValue

The right value

Properties

CanResolveLeft

Gets a value indicating whether the inconsistency can be automatically resolved modifying the left hand model only

public bool CanResolveLeft { get; }

Property Value

bool

CanResolveRight

Gets a value indicating whether the inconsistency can be automatically resolved modifying the right hand model only

public bool CanResolveRight { get; }

Property Value

bool

LeftContext

Gets the LHS context element

public TLeft LeftContext { get; }

Property Value

TLeft

LeftSetter

Gets a function that sets the value at the LHS

public Action<TLeft, TValue> LeftSetter { get; }

Property Value

Action<TLeft, TValue>

LeftValue

Gets the LHS property value

public TValue LeftValue { get; }

Property Value

TValue

Representation

Gets a human-readable description of this inconsistency

public string Representation { get; }

Property Value

string

RightContext

Gets the RHS context element

public TRight RightContext { get; }

Property Value

TRight

RightSetter

Gets a function that sets the value at the RHS

public Action<TRight, TValue> RightSetter { get; }

Property Value

Action<TRight, TValue>

RightValue

Gets the RHS property value

public TValue RightValue { get; }

Property Value

TValue

Methods

Equals(IInconsistency)

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

public bool Equals(IInconsistency other)

Parameters

other IInconsistency

An object to compare with this object.

Returns

bool

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

Equals(PropertyInequality<TLeft, TRight, TValue>)

public bool Equals(PropertyInequality<TLeft, TRight, TValue> other)

Parameters

other PropertyInequality<TLeft, TRight, TValue>

Returns

bool

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

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

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ResolveLeft()

Resolves the inconsistency modifying the left hand side model

public void ResolveLeft()

ResolveRight()

Resolves the inconsistency modifying the right hand side model

public void ResolveRight()

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.