Skip to content

Instantly share code, notes, and snippets.

@cbcwebdev
Created May 25, 2012 19:00
Show Gist options
  • Save cbcwebdev/2789879 to your computer and use it in GitHub Desktop.
Save cbcwebdev/2789879 to your computer and use it in GitHub Desktop.
public class Calendar : Story
{
private string _region;
private readonly ISet<Event> _events;
public Calendar(Guid id, string region)
{
Id = id;
_region = region;
_events = new HashSet<Event>();
}
public Event Schedule(User contributor, EventDetail detail)
{
var @event = EventFactory.Create(this, contributor, detail);
_events.Add(@event);
return @event;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment