Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (19 sloc) 862 Bytes
using System;
using System.ComponentModel;
using System.Diagnostics.Contracts;
namespace Strilanc.Value {
///A potential value that may or may not contain an unknown value of unknown type.
///All implementations should compare equal and have a hash code of 0 when HasValue is false.
///Used to allow comparisons of the raw May.NoValue to generic ones like May&lt;int&gt;.NoValue.
///Also used as the result type of the 'do action if value present' method, but only because there is no standard void or unit type.
public interface IMayHaveValue : IEquatable<IMayHaveValue> {
///<summary>Determines if this potential value contains a value or not.</summary>
bool HasValue { get; }