static Predicate <Item> AsByteSelectorFor(EnumAsByte value) { return(delegate(Item candidate) { return candidate._asByte == value; }); }
private void AssertQuery(EnumAsByte constraint) { IQuery query = NewQuery(); query.Constrain(typeof(Item)); query.Descend("_asByte").Constrain(constraint); IObjectSet result = query.Execute(); Assert.AreEqual(1, result.Count); AssertItem(FindItemWithValue(constraint), (Item)result[0]); }
private static Item FindItemWithValue(EnumAsByte value) { #if CF || SILVERLIGHT foreach (Item item in _items) { if (item._asByte == value) { return(item); } } return(null); #else return(Array.Find(_items, delegate(Item candidate) { return candidate._asByte == value; })); #endif }
public Item(EnumAsByte asByte, EnumAsInteger asInteger, EnumAsLong asLong) { _asByte = asByte; _asInteger = asInteger; _asLong = asLong; }