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
TLeftThe LHS context element
leftSetter
Action<TLeft, TValue>The LHS setter
leftValue
TValueThe left value
rightContext
TRightThe RHS context element
rightSetter
Action<TRight, TValue>The RHS setter
rightValue
TValueThe 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
CanResolveRight
Gets a value indicating whether the inconsistency can be automatically resolved modifying the right hand model only
public bool CanResolveRight { get; }
Property Value
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
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
IInconsistencyAn object to compare with this object.
Returns
Equals(PropertyInequality<TLeft, TRight, TValue>)
public bool Equals(PropertyInequality<TLeft, TRight, TValue> other)
Parameters
other
PropertyInequality<TLeft, TRight, TValue>
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
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.