Skip to content

Commit

Permalink
Added an extra contract assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Aesir committed Dec 11, 2011
1 parent d3a90ba commit 12ed366
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ObservableKinect/KinectSensor.cs
Expand Up @@ -34,6 +34,7 @@ private void ObjectInvariant()
/// <returns>A sensor instance which will allow you to operate on the Kinect that was just started.</returns>
public static KinectSensor Start(RuntimeOptions options, int kinectIndex = 0)
{
Contract.Requires(0 < Runtime.Kinects.Count);
Contract.Requires(kinectIndex >= 0 && kinectIndex < Runtime.Kinects.Count);
Contract.Ensures(Contract.Result<KinectSensor>() != null && ReferenceEquals(Contract.Result<KinectSensor>().Device, Runtime.Kinects[kinectIndex]));

Expand Down

0 comments on commit 12ed366

Please sign in to comment.