Generic parameter class with HasChanged functionality
I'm still not sure about its usage but here's the review.




public T InitialValue
{
    get { return m_initialValue; }
}

public T UpdatedValue
{
    get { return m_updatedValue; }
}



As a user of this class I most probably don't want to think about which value I should use. I bet it'll be always the latest one so a single property like Value returning the most up-to-date value would be more appropriate.




public UpdatableParam(T initialValue, T updatedValue)
{
    m_initialValue = ObjectCopier.Clone(initialValue);
    m_updatedValue = ObjectCopier.Clone(updatedValue);
}



Initializing the class already with an updated-value is somehow counterintuitive to me. Why would I want to do that? I thought it should track changes and not be created in a changed state already.




public UpdatableParam(T initialValue)
{
    m_initialValue = ObjectCopier.Clone(initialValue);
    m_updatedValue = ObjectCopier.Clone(initialValue);
}



I don't want to update the value. I just want to set a new one via the Value property. The object tracking it should be able to figure out what's going on which leads me to the next point:


public virtual bool HasChanged()
{
    return !EqualityComparer&lt;T&gt;.Default.Equals(m_initialValue, m_updatedValue);
}



This should a property, usulay like IsDirty.



With all suggestions applied I could imagine the new clean object could be implemented like this:

public class TrackingValue&lt;T&gt;
{
    private readonly T _initialValue;
    private T _newValue;

    public TrackingValue(T initialValue)
    {
        _initialValue = ObjectCopier.Clone(initialValue);
        _newValue = _initialValue; // No cloning, it's the same value.
    }

    public T Value
    {
        get =&gt; IsDirty ? _newValue : _initialValue;
        set =&gt; _newValue = ObjectCopier.Clone(value);
    }

    public virtual bool IsDirty =&gt; !EqualityComparer&lt;T&gt;.Default.Equals(_initialValue, _newValue);

    public static implicit operator T(TrackingValue&lt;T&gt; value) =&gt; value.Value;
}


Additionally I want to be able to use the value without effort thus the implicit cast operator so that I can put the wrapper where I usually use the actual value and the compile will figure out the rest.