- Add SliceWithLambda.slnx + csproj scaffolding for ideas/slice-with-lambda/ exercise/csharp (examples project + xUnit solution/test project) - Add exercises/slice-with-lambda (C# version of the prefactored-longrange exercise with Buyers and SliceWithLambda projects) - Add export/slice-with-lambda (nested git repo with exercise export) - Ignore bin/ and obj/ build output at repo root
23 lines
450 B
C#
23 lines
450 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace IceCreamBuyers
|
|
{
|
|
public class Buyer
|
|
{
|
|
public Buyer(string name, IReadOnlyList<IceCream> favourites)
|
|
{
|
|
Name = name;
|
|
Favourites = favourites;
|
|
}
|
|
|
|
public string Name { get; }
|
|
public IReadOnlyList<IceCream> Favourites { get; }
|
|
|
|
public int ScoopsOf(IceCream flavour)
|
|
{
|
|
return 2;
|
|
}
|
|
}
|
|
}
|