Created
May 25, 2012 19:04
-
-
Save cbcwebdev/2789916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Calendar : Story | |
{ | |
private Region _region; | |
private readonly ISet<Event> _events; | |
public Calendar(Guid id, Region 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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Region : AggregateBase | |
{ | |
private string _name; | |
private Boundary _boundary; | |
public Region(Guid id, string name, Boundary boundary) | |
{ | |
Id = id; | |
_name = name; | |
_boundary = boundary; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment