Class simulating a connection among two pins Following this post and the one before that, here I am asking for a review on another piece of code: the connection among two pins. As usual, be merciless in your review. Here it goes:

public class PinConnection : IObserver&lt;Pin&gt;
{
    #region variables
    private Pin _from;
    private Pin _to;
    private IDisposable _fromUnsubscriber;
    private IDisposable _toUnsubscriber;
    #endregion

    #region properties
    /// &lt;summary&gt;
    /// Get or Set the label of this PinConnection object.
    /// &lt;/summary&gt;
    public string Label { get; set; }

    public Pin From
    {
        get
        {
            return _from;
        }
        set
        {
            _from = value;

            if (_fromUnsubscriber != null)
            {
                _fromUnsubscriber.Dispose();
            }

            if (_from != null)
            {
                _fromUnsubscriber = _from.Subscribe(this);
                _from.Notify(_from);
            }
        }
    }

    public Pin To
    {
        get
        {
            return _to;
        }
        set
        {
            _to = value;

            if (_toUnsubscriber != null)
            {
                _toUnsubscriber.Dispose();
            }

            if (_to != null)
            {
                _toUnsubscriber = _to.Subscribe(this);
                _to.Notify(_to);
            }
        }
    }
    #endregion

    #region constructors
    public PinConnection()
    {
        Code = string.Empty;
        Label = string.Empty;
    }

    public PinConnection(Pin from)
        : this()
    {
        From = from;
    }

    public PinConnection(Pin from, Pin to)
        : this(from)
    {
        To = to;
    }
    #endregion

    public void OnCompleted()
    {
        throw new NotImplementedException();
    }

    public void OnError(Exception error)
    {
        throw error;
    }

    public void OnNext(Pin value)
    {
        if (value.Equals(From) &amp;&amp; To != null)
        {
            To.Value = value.Value;
        }
    }
}
I'm not sure how I feel about this. 


public void OnCompleted()
{
    throw new NotImplementedException();
}



In my opinion, if you're going to implement a contract, you should fulfill the contract, even if that means doing nothing at all. There's little more frustrating than getting an object that you believe implements an interface only to find out that it doesn't really implement it. Oh no, this implementation throws an exception when I call that method. Now, my nice clean code that, previously, didn't care what concrete type it was passed has to type check it's args to make sure it's not an instance of this class you've created. 

Ok. So I do know how I feel about it. I hate it. I really really hate it. I'd much rather that you fulfill the contract by truly not implementing it. 

/// &lt;summary&gt;
/// Does nothing. Not implemented for reasons.
/// &lt;/summary&gt;
public void OnCompleted() { }


Now my code doesn't have to type check for your class anymore. Even better, I know why you've not implemented this part of the contract and decided that this method should just do nothing at all when called. 

Of course, if it's not going to do anything, then we can hide it from the public interface of the concrete type by explicitly implementing the interface. 

/// &lt;summary&gt;
/// Does nothing. Not implemented for reasons.
/// &lt;/summary&gt;
public void IObserver.OnCompleted() { }