Skip to content

Instantly share code, notes, and snippets.

View kellypleahy's full-sized avatar

Kelly Leahy kellypleahy

View GitHub Profile
// field _LookAhead
Node Operand()
{
Node ret;
if(matches(TokenId.Identifier))
{
ret = new Node()
{
Value = _LookAhead.TokenText,
public interface ICommandRepository<T>
{
void SaveOrUpdate<U>(U item) where U: T;
void Delete<U>(U item) where U: T;
}
/* then, library code asks for ICommandRepository<Core.Customer> and so do clients.
However, when clients call SaveOrUpdate, they'll be passing a Extended.Customer,
but when library code calls it, they'll be passing what they think is a Core.Customer
(though it will still be a Extended.Customer, of course).