Class IncrementalPropertyConsistencyCheck<TLeft, TRight, T>
- Namespace
- NMF.Synchronizations.Inconsistencies
- Assembly
- NMF.Synchronizations.dll
Denotes an incrementally maintained inconsistency that a property has different values in LHS and RHS
public class IncrementalPropertyConsistencyCheck<TLeft, TRight, T> : IDisposable, IInconsistency, IEquatable<IInconsistency>
Type Parameters
TLeftthe type of the left context
TRightthe type of the right context
Tthe type of values
- Inheritance
-
IncrementalPropertyConsistencyCheck<TLeft, TRight, T>
- Implements
- Inherited Members
Constructors
IncrementalPropertyConsistencyCheck(TLeft, TRight, IInconsistencyDescriptor<TLeft, TRight, T, T>, INotifyReversableValue<T>, INotifyReversableValue<T>, ISynchronizationContext)
Creates a new inconsistency
public IncrementalPropertyConsistencyCheck(TLeft left, TRight right, IInconsistencyDescriptor<TLeft, TRight, T, T> descriptor, INotifyReversableValue<T> source1, INotifyReversableValue<T> source2, ISynchronizationContext context)
Parameters
leftTLeftthe left element
rightTRightthe right element
descriptorIInconsistencyDescriptor<TLeft, TRight, T, T>a descriptor
source1INotifyReversableValue<T>The LHS source
source2INotifyReversableValue<T>The RHS source
contextISynchronizationContextThe context in which the inconsistency arose
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
Context
Gets the synchronization context in which the inconsistency was found
public ISynchronizationContext Context { get; }
Property Value
LeftElement
The object that this inconsistency is anchored at on the left side
public object LeftElement { get; }
Property Value
Representation
Gets a human-readable description of the inconsistency
public string Representation { get; }
Property Value
RightElement
The object that this inconsistency is anchored at on the right side
public object RightElement { get; }
Property Value
SourceLeft
Gets an incrementally maintained value for the LHS property value
public INotifyReversableValue<T> SourceLeft { get; }
Property Value
SourceRight
Gets an incrementally maintained value for the RHS property value
public INotifyReversableValue<T> SourceRight { get; }
Property Value
Methods
DescribeLeft()
Gets a string describing the inconsistency from the point of view of the left side
public string DescribeLeft()
Returns
- string
a human-readable description of the inconsistency
DescribeRight()
Gets a string describing the inconsistency from the point of view of the right side
public string DescribeRight()
Returns
- string
a human-readable description of the inconsistency
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Equals(IInconsistency)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(IInconsistency other)
Parameters
otherIInconsistencyAn object to compare with this object.
Returns
Equals(IncrementalPropertyConsistencyCheck<TLeft, TRight, T>)
public bool Equals(IncrementalPropertyConsistencyCheck<TLeft, TRight, T> other)
Parameters
otherIncrementalPropertyConsistencyCheck<TLeft, TRight, T>
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe 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.