title: Does Observable.Range break The Observable Contract?
body: <p>In learning about Rx I've come across an often repeated rule about <em>Observables</em> that is spelled out in <a href="http://reactivex.io/documentation/contract.html" rel="nofollow noreferrer">The Observable Contract</a>.</p>
  
  <blockquote>
    <p>Upon issuing an OnCompleted or OnError notification, it may not thereafter issue any further notifications. </p>
  </blockquote>
  
  <p>This makes good sense to me, since it would be confusing to have an Observable continue to produce values after it has completed, but when I tested the Observable.Range method in .NET I noticed that it does not exhibit that behavior, and in fact <em>many</em> Observables violate this rule.</p>
  
  <pre><code>var rangeObservable = Observable.Range(0, 5);
  
  rangeObservable.Subscribe(Console.WriteLine, () =&gt; Console.WriteLine("Done first!"));
  Console.ReadLine();
  
  rangeObservable.Subscribe(Console.WriteLine, () =&gt; Console.WriteLine("Done second!"));
  Console.ReadLine();
  
  //Output:
  //0
  //1
  //2
  //3
  //4
  //Done first!
  
  //0
  //1
  //2
  //3
  //4
  //Done second!
  </code></pre>
  
  <p>Clearly <code>rangeObservable</code> has called <code>OnComplete</code> two times and produced values after the first <code>OnComplete</code>. This leads me to believe that this is not a rule about <em>Observables</em> but instead a rule about <em>Subscriptions</em>. That is, an <em>Observable</em> may produce as many terminating messages as it wants, and even produce values after it has, so long as each <em>Subscription</em> only receives one terminating message and receives no further messages after that.</p>
  
  <p>Do they actually mean <em>Subscription</em> when it says <em>Observable</em>? Are they truly different things? Do I have a fundamental misunderstanding of the model?</p>